As configured in my dotfiles.
start new:
tmux
start new with session name:
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
w = 500 | |
h = 300 | |
x = null | |
y = null | |
intervalTime = 500 | |
data = d3.range(100).map((n) -> Math.round(Math.random() * 100)) | |
setInterval( | |
() -> |
# Usage: | |
# source iterm2.zsh | |
# iTerm2 tab color commands | |
# https://iterm2.com/documentation-escape-codes.html | |
if [[ -n "$ITERM_SESSION_ID" ]]; then | |
tab-color() { | |
echo -ne "\033]6;1;bg;red;brightness;$1\a" | |
echo -ne "\033]6;1;bg;green;brightness;$2\a" |
# Block Facebook | |
# add these to /etc/hosts | |
127.0.0.1 facebook.com | |
127.0.0.1 www.facebook.com | |
127.0.0.1 login.facebook.com | |
127.0.0.1 blog.facebook.com | |
127.0.0.1 apps.facebook.com | |
127.0.0.1 static.ak.fbcdn.net | |
127.0.0.1 www.static.ak.fbcdn.net |
As configured in my dotfiles.
start new:
tmux
start new with session name:
From 8a07f968d5185e23ec089669b1d2e2c65ccdcf68 Mon Sep 17 00:00:00 2001 | |
From: Utkarsh Upadhyay <musically.ut@gmail.com> | |
Date: Sat, 17 Mar 2012 13:14:45 +0530 | |
Subject: [PATCH] Ratings in notifications. | |
1. Adds buttons to rate the playing entry from the song-change/status-icon notification itself. | |
2. Adds configuration UI to enable/disable the rating buttons. | |
--- | |
data/org.gnome.rhythmbox.gschema.xml | 10 + | |
plugins/notification/Makefile.am | 6 + |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
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 |