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
#!/usr/bin/env python | |
import sys | |
import os | |
def usage(): | |
print 'usage: {} [errno]'.format(sys.argv[0]) | |
sys.exit(1) | |
if __name__ == '__main__': |
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
#!/usr/bin/env escript | |
%% -*- coding: utf-8 -*- | |
%% TODO: Set up paths to riakc, riak_pb and protobuffs below. | |
%%! -pa /path/to/riakc, riak_pb and protobuffs | |
%% My output: | |
%% Indices before put: [{"band_bin","Mötley Crüe"}]. | |
%% Indices after put: [{"band_bin", | |
%% [77,195,131,194,182,116,108,101,121,32,67,114,195,131, | |
%% 194,188,101]}]. |
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
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi | |
PROMPT='%{$fg[$NCOLOR]%}%m %{$fg[blue]%}%~%{$reset_color%} ➤ %{$reset_color%}' | |
RPROMPT='%{$fg[blue]%}%p $(git_prompt_info)%{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="" | |
ZSH_THEME_GIT_PROMPT_CLEAN="✔" | |
ZSH_THEME_GIT_PROMPT_DIRTY="✗" |
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
test(Derp) -> | |
case Derp of | |
true -> OhYes = yes; | |
false -> OhYes = no; | |
end, | |
io:format("~p~n", [OhYes]). |
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
;; Disable the electric arrow, but keep comma and semicolon | |
(setq-default erlang-electric-commands | |
'(erlang-electric-comma | |
erlang-electric-semicolon)) |
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 assemble: | |
/ $ palbart -l fizzbuzz.pal | |
/ To run, install the SimH emulator collection and run: | |
/ $ pdp8 | |
/ sim> load fizzbuzz.bin | |
/ sim> go 200 | |
*10 | |
X1, 0 / Autoincrement register for TTY printing |
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
start_graph(App) -> | |
case application:start(App) of | |
ok -> | |
ok; | |
{error, {already_started, App}} -> | |
ok; | |
{error, {not_started, AppDep}} -> | |
start_graph(AppDep), | |
start_graph(App) % Try again | |
end. |
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
;; Download fci-mode from http://www.emacswiki.org/emacs/fill-column-indicator.el | |
;; Add this to .emacs.d/init.el | |
(require 'fill-column-indicator) | |
(define-globalized-minor-mode global-fci-mode | |
fci-mode (lambda () (fci-mode 1))) | |
(setq-default fci-rule-color "red") | |
(setq-default fci-rule-column 80) | |
(global-fci-mode 1) |
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
package main | |
// int callGate(void* p) { | |
// return ((int (*)())p)(); | |
// } | |
import "C" | |
import ( | |
"os" | |
"io" |
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
(define (fib n) | |
(if (<= n 1) n | |
(+ (fib (- n 1)) (fib (- n 2))))) | |
;; (define (fib-iter n1 n2) | |
;; (if (< n2 2) | |
;; (+ n1 n2) | |
;; (fib-iter n2 (+ n1 n2)))) | |
;; (define (fib-iter-cps n1 n2 k) |
OlderNewer