Skip to content

Instantly share code, notes, and snippets.

@veekaybee
veekaybee / normcore-llm.md
Last active May 6, 2024 16:10
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@kconner
kconner / macOS Internals.md
Last active May 6, 2024 22:20
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@xmpf
xmpf / utranslate.py
Last active September 30, 2023 00:31
Change ASCII to Unicode encoding => Filter Bypass
#!/usr/bin/env python3
import sys
import signal
from types import FrameType
from typing import Union
def sighandler(signum: int, frame: Union[FrameType, None]) -> signal.Handlers:
sys.stdout.write("\r")
export DISPLAY=$(powershell.exe -Command '(Get-NetIPAddress -AddressFamily IPv4 | Where-Object {$_.AddressState -eq "Preferred" -and ($_.InterfaceAlias -eq "Wi-Fi" -or $_.InterfaceAlias -eq "Ethernet")}).IPAddress' | sed 's/.$//'):0.0
export LIBGL_ALWAYS_INDIRECT=1
@programmeruser2
programmeruser2 / jwt.js
Last active May 31, 2022 09:15
Decode JWT
const decodeJwt = token => token.split('.').map((item,index) => index==2?item:JSON.parse(atob(item)));
const encodeJwt = segments => segments.map((item,index)=>index==2?item:btoa(JSON.stringify(item))).join('.');
@tunalad
tunalad / [Sonic Pi] Darkthrone - Transilvanian Hunger.rb
Last active June 17, 2023 22:41
[Sonic Pi] Darkthrone - Transilvanian Hunger
# Darkthrone - Transilvanian Hunger
use_debug false
use_bpm 139
use_sample_defaults amp: 0.5
use_synth :blade
use_synth_defaults release: 0.5
sample :drum_cymbal_closed
@programmeruser2
programmeruser2 / ip.ps1
Last active July 5, 2021 13:52
Get the Wi-Fi or Ethernet IP Address
(Get-NetIPAddress -AddressFamily IPv4 | Where-Object {$_.AddressState -eq "Preferred" -and ($_.InterfaceAlias -eq "Wi-Fi" -or $_.InterfaceAlias -eq "Ethernet")}).IPAddress
@probonopd
probonopd / Wayland.md
Last active May 7, 2024 10:25
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr

@poliva
poliva / fc2-elo.js
Created September 28, 2020 10:13
Fightcade's ranking system Elo implementation
function getK (elo) {
// for rank '?' (<10 games played) the K factor is 20
if (elo < 700) return 34; // rank E
if (elo < 1000) return 32; // rank D
if (elo < 1300) return 30; // rank C
if (elo < 1600) return 28; // rank B
if (elo < 1900) return 26; // rank A
return 24; // rank S
}