Skip to content

Instantly share code, notes, and snippets.

@Klerith
Klerith / docker-compose.yml
Last active April 28, 2024 06:49
PostgreSQL + PgAdmin
version: '3'
services:
myDB:
image: postgres:15.3
container_name: my-database
restart: always
ports:
- 5432:5432
environment:
@atoonk
atoonk / AWS_v4prefixes.md
Last active April 28, 2024 06:48
AWS prefixes

Summary

Total number of IPv4 addresses: 100,750,168. That’s the equivalent of just over six /8’s Also see this blog: https://toonk.io/aws-and-their-billions-in-ipv4-addresses/

just for fun, let's put a value number on that

Total value at, $20 per IP: => $2,015,003,360

Total value at, $25 per IP: => $2,518,754,200

@sylvainfaivre
sylvainfaivre / thinkpad_cpu_throttling_lap_mode.md
Last active April 28, 2024 06:48
CPU throttling and "lap mode" on Lenovo Thinkpad laptops

CPU throttling and "lap mode" on Lenovo Thinkpad laptops

Test setup

Hardware : Lenovo Thinkpad P14s, Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz

Software : Ubuntu 21.10, Gnome 40.4.0, Linux 5.13.0

Background

@kouroshHakha
kouroshHakha / create_test_dataset.py
Created December 11, 2023 05:06
JSON Mode and Function-calling on Open LLMs Blogpost
import datasets
import re
import json
import tqdm
ds = datasets.load_dataset("glaiveai/glaive-function-calling-v2", split="train")
out_ds_size = 100
class UserAssistantNotFoundError(Exception):
@meloonics
meloonics / example.md
Last active April 28, 2024 06:46
Obsidian CSS: Stylable Image containers with captions, made from Callouts

image-paths are obviously broken on this one, you can replace the links with images of your own.

[!fig|left|snail]- ![[snail.png|Snail Facts!|200]] Snails are cool! Click to learn more!

  • Snails r cute :3
  • They be eating leaf
  • Swirly soft-boi chomkers :3333

Read-more [[Le Smail Manifesto|here]]!

[!fig|right|px] ![[meloonics_64.png|64]] It me!

@osy
osy / xg_mobile_connector.md
Last active April 28, 2024 06:45
XG Mobile Connector Notes

These are notes written up about the XG Mobile connector which is found on the Asus ROG Ally as well as some ROG Flow models. The goal is to build a custom eGPU enclosure that is compatible with the XG Mobile connector.

XG Mobile Cable

The XG Mobile Cable comes with ROG XG Mobile and can be purchased from a [parts store][2] for $129 USD. It has a male XG Mobile Connector on one end and three cables on the other end: two 40-pin FPC cables and a 8-pin connector. The cable carries a USB-C connection, PCIe x8 signal pairs, PCIe clock, an SMBus/I2C connection, and some sideband signals for power detection and hot-plug support.

XG Mobile Connector

The pinout can be obtained from the [GV301QC schematic][1] (page 69).

Pin Name Pin Name
C1 PCIENB_TXP0_C D1 PCIENB_TXP5_C
@diego3g
diego3g / settings.json
Last active April 28, 2024 06:44
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 14,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [80, 120],
"extensions.ignoreRecommendations": true,
"typescript.tsserver.log": "off",
"files.associations": {
@interference-security
interference-security / writable-avd.md
Last active April 28, 2024 06:44
How to make AVD system and file-system writable?
@Lexizz7
Lexizz7 / settings.json
Last active April 28, 2024 06:44
VSCode Settings + Minimalist interface (Windows)
// Requirements:
// 1. Must install APC extension (drcika.apc-extension)
// 2. Change the font family or install JetBrainsMono Nerd Font (https://www.nerdfonts.com/font-downloads)
// 3. Change the color theme or install Catppuccin Mocha (Catppuccin.catppuccin-vsc)
// 3.1. If you changed the color theme, also change the color of the window controls to match the theme (Line 101 of this gist)
// 4. Change the icon theme or install Symbols (miguelsolorio.symbols)
// 5. Change/add your specific settings whatever you like
// ⚠ Made for Windows so idk how its gonna look on Mac
{
// General
@mecid
mecid / Calendar.swift
Last active April 28, 2024 06:42
SwiftUI Calendar view using LazyVGrid
import SwiftUI
extension Calendar {
func generateDates(
inside interval: DateInterval,
matching components: DateComponents
) -> [Date] {
var dates: [Date] = []
dates.append(interval.start)