Skip to content

Instantly share code, notes, and snippets.

View ELLIOTTCABLE's full-sized avatar
🐫

ELLIOTTCABLE

🐫
View GitHub Profile
# Protocol: SSH ; Host: 127.0.0.1:4444 ; User Name: elliottcable ; Identity: ~/.identity
ssh 174.129.205.205 -p 22 -o 'ProxyCommand nc -x 13.37.13.37:1337 %h %p' -CfnNTg -o 'CompressionLevel 9' \
-R '127.0.0.1:2222:0.0.0.0:22'
ssh 174.129.205.205 -p 22 -o 'ProxyCommand nc -x 13.37.13.37:1337 %h %p' \
'ssh 127.0.0.1 -p 2222 -Ng'\
' -R '\''127.0.0.1:4444:0.0.0.0:22'\'''
#ssh 127.0.0.1 -p 2222 -Ng \
# -R '127.0.0.1:4444:0.0.0.0:22'
# ---- ---- /!\ ---- ---- #
“Either:”
test ↼ { @ fork; print("hi."); print(@); print("hi again."); }
a ↼ b each
test(a)
“Or:”
test ↼ { print("hi.", @, "hi again."); }
request ↼ server listen()
print("how many times is this printed", request address, request port)
#--------
display ↼ routine { print("how many times is this printed", @ address, @ port) }
request ↼ server listen()
display(request)
(defclass rock ()())
(defclass paper ()())
(defclass scissors ()())
(defgeneric r-p-s (a b))
(defmethod r-p-s ((r rock) (p paper)) 'paper)
(defmethod r-p-s ((r rock) (s scissors)) 'rock)
(defmethod r-p-s ((p paper) (s scissors)) 'scissors)
#!/usr/bin/ruby
#
# Download and execute this script in one-line with no temporary files:
#
# ruby -e "$(curl http://gist.github.com/raw/323731/install_homebrew.rb)"
#
#
# I deliberately didn't DRY /usr/local references into a variable as this
# script will not "just work" if you change the destination directory. However
# please feel free to fork it and make that possible.
// A Javascript version of Allan Odgaard's thousands separator regex
// http://blog.macromates.com/2007/recursion-in-regular-expressions/
123456789.toString().replace(/(\d{1,3})(?=(\d{3})+(?!\d))/g, '$1,');
// => "123,456,789"
void display(int x[BOARD_WIDTH][BOARD_HEIGHT]) {
printf(" 1 2 3 4 5 6 7\n\n");
for (int i = 0; i < BOARD_HEIGHT; ++i) {
printf("%d ", i + 1);
for (int j = 0; j < BOARD_WIDTH; ++j)
if (x[j][i] >= (int)'0')
printf("%c ", (char)(x[j][i] + (int)'0'));
mathematics
I/O STDIN
“Trabb-Pardo Knuth”
r ↼ routine
mathematics √(mathematics absolute.value(argument last)) + 5 × argument last ³
11 times { I/O STDIN get.string } reverse each
n ↼ r(argument)
my.strings ↼ ~‘foo,’ ‘bar,’ ‘baz’
my.strings each
print(argument)
def what_is_gist
Sex::Pure
end