This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; skewer-coffee.el --- skewer support for live-interactive Coffeescript | |
(defun skewer-coffee-eval (coffee-code) | |
"Requests the browser to evaluate a coffeescipt string." | |
;; XXX should escape double quote characters | |
(skewer-eval (concat "CoffeeScript.eval(\"" | |
(s-replace "\n" "\\n" (s-trim coffee-code)) | |
"\");") | |
#'skewer-post-minibuffer)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; ssh-keys.el | |
;; While keeping long standing emacs sessions on remote machines | |
;; inside terminal multiplexers such as 'screen' and 'tmux', the | |
;; SSH_AUTH_SOCK environment variable of the emacs process becomes | |
;; stale after disconnection and reconnection. The interactive | |
;; function SET-SSH-AGENT-SOCKET below allows for a quick and dirty | |
;; way to automatically reset this variable to the latest incoming SSH | |
;; agent authorization socket. |
It is possible to compile Go programs for a different OS, even though go build
says otherwise.
You'll need:
- a valid toolchain for the platform/os you're targetting
- Go Tip (works on 1.1 and 1.2rc1 but you might as well be on tip)
golang-crosscompile
helper script https://github.com/davecheney/golang-crosscompile- the patch provided
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To popup a balloon tip in notification area. | |
// | |
// Usage: | |
// notification.exe [title] [content] [timeout] | |
// * custom icon can be used when named "notify.ico", which should stay | |
// in the current directory. | |
// | |
// How to compile: | |
// g++ notification.cpp -o notification.exe -lshlwapi | |
// Passed on mingw(http://nuwen.net/mingw.html). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VICE_REMOTE_MONITOR = true | |
VICE_REU = true | |
VICE_CARTRR = cartridge/rr38p-tmp12reu.bin | |
VICE_PATH = /Applications/x64.app/Contents/MacOS/x64 | |
VICE_OPTS = +confirmexit -rrbioswrite | |
DEFAULT_PRG = learning | |
include c64_kickass.mk | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"crypto/rand" | |
"crypto/sha256" | |
"crypto/subtle" | |
"encoding/base64" | |
"strconv" | |
"strings" | |
"time" | |
"golang.org/x/crypto/pbkdf2" |