Skip to content

Instantly share code, notes, and snippets.

View aalear's full-sized avatar

Adam Lear aalear

View GitHub Profile
@NickCraver
NickCraver / Microsoft.PowerShell_profile.ps1
Last active October 3, 2025 16:01
Craver's oh-my-posh profile
# This goes in your Microsoft.PowerShell_profile.ps1 (can find the path via $PROFILE in your prompt)
Import-Module -Name posh-git,oh-my-posh,Terminal-Icons
Set-PoshPrompt -Theme craver
@panphora
panphora / slow-down-twitch-chat.js
Created February 25, 2016 02:14
Slow down twitch chat
// INSTRUCTIONS
// 1. paste in Google Chrome dev console
// 2. enjoy!
// don't display any chat messages by default
var style = document.createElement("style");
style.appendChild(document.createTextNode(""));
document.head.appendChild(style);
style.sheet.insertRule("body .ember-chat .chat-messages .chat-line {display: none;}", 0);
@couchand
couchand / README.markdown
Created July 10, 2014 14:11
Some fun FIFA pairings

These were selected from the 43,472 possible FIFA pairings by comparing their bigrams (sequences of pairs of letters) to the frequencies observed in Google Books N-grams dataset. The algorithm could probably be improved by weighting the middle pair greater (since that's the only degree of freedom), normalizing for letter frequency, increasing the analysis to trigrams or further, etc.

Code forthcoming.

@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs