Skip to content

Instantly share code, notes, and snippets.

View joelmgallant's full-sized avatar

Joel Matthew Gallant joelmgallant

  • Halifax, NS
View GitHub Profile
@dusty
dusty / make_icons_cordova.sh
Created September 9, 2014 02:57
Make cordova splash and icons from master files
#!/bin/bash
ICON_SRC="src/res/icon-master.png"
## ANDROID
ICON_DIR="build/platforms/android/res"
mkdir -p $ICON_DIR
convert $ICON_SRC -resize 36x36 "${ICON_DIR}/drawable-ldpi/icon.png"
convert $ICON_SRC -resize 48x48 "${ICON_DIR}/drawable-mdpi/icon.png"
convert $ICON_SRC -resize 72x72 "${ICON_DIR}/drawable-hdpi/icon.png"
@staltz
staltz / introrx.md
Last active April 13, 2025 15:46
The introduction to Reactive Programming you've been missing
@jboner
jboner / latency.txt
Last active April 15, 2025 05:58
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
@mikebridge
mikebridge / pandora.coffee
Created February 17, 2012 06:36
Adapter from hubot to an A.L.I.C.E pandorabot
# Chat with hubie.
#
# hubie <anything>
#
# don't forget to set HUBOT_PANDORA_BOTID = <botid>
QS = require "querystring"
module.exports = (robot) ->