Skip to content

Instantly share code, notes, and snippets.

@callumacrae
callumacrae / build-tools.md
Last active October 25, 2023 15:14
Build tools written in JavaScript
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active July 22, 2025 10:47
Backend Architectures Keywords and References
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 12, 2025 14:05
A badass list of frontend development resources I collected over time.
"""requests wrapper
>>> import curledrequests as requests
you can use this as requests module, but...
>>> requests.debug = True
>>> requests.get('http://example.com/')
curl http://example.com/
Hello
@teppeis
teppeis / tenkaichi-git.md
Last active April 29, 2023 14:58
天下一gitconfig大会

天下一gitconfig大会(サイボウズ社内git勉強会@2012/11/20)の@teppeisの資料です。

ぎっとぎとにしてやんよ

DojoCat

  • gistでmarkdown書いたらbookmarkletでプレゼンになるよ。
@radiosilence
radiosilence / gist:3946121
Created October 24, 2012 13:43
Outputs some files that WMs can import and colourify everything with.
import sys
import colorsys
from colorz import colorz
WALLPAPER = '/home/james/.wallpaper'
COLORS = '/home/james/.colors'
XRESOURCES = '/home/james/.Xresources'
cols = ''
xres = """
class DotDict(dict):
"""dict class that allows you to access values by dot notation"""
def __init__(self,arg):
for k in arg.keys():
if (type(arg[k]) is dict):
self[k]=DotDict(arg[k])
else:
self[k]=arg[k]
def __getattr__(self, attr):
var lastUsedHeap = 0; // remember the heap size
function checkMemory()
{
// check if the heap size is this cycle is LESS than what we had last
// cycle; if so, then the garbage collector has kicked in
if (window.performance.memory.usedJSHeapSize < lastUsedHeap)
console.log('Garbage collected!');
lastUsedHeap = window.performance.memory.usedJSHeapSize;
@jboner
jboner / latency.txt
Last active August 2, 2025 22:26
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@hrldcpr
hrldcpr / tree.md
Last active June 19, 2025 08:17
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!