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
$(document).ready(function() { | |
#depends on pitchdeck | |
$(document).pitchdeck({ | |
top_links: '#nav_center a', | |
easing: 'easeInOutQuart', | |
next_button: '.next, .start', | |
link_labels: true | |
}); | |
#depends on waypoint.js | |
$('.pagenumber').each(function(k, e) { |
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
_go() | |
{ | |
word=${COMP_WORDS[COMP_CWORD]} | |
allwords= (ls $HOME/Projects) | |
COMPREPLY= $(compgen "-W '$allwords' $word") | |
} | |
complete -F _go go | |
#Doh. Need to surround the ls with ( parenthesis ) |
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
module Raptor | |
class App | |
def run options | |
require 'rack' | |
Rack::Handler::WEBrick.run(app, options) | |
end | |
end | |
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
#http://projecteuler.net/problem=1 | |
module SumMultiplesOf3And5 | |
def self.below number | |
max = number - 1 | |
stepify([3,5], max).collect(&:step).reduce(:|).reduce(0, :+) | |
end | |
def self.stepify numbers, max | |
numbers.map { |n| Stepper.new(n, max) } | |
end | |
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
Account = (function(startingBalance) { | |
return { | |
balance: startingBalance, | |
getBalance: function() { | |
return this.balance | |
} | |
}; | |
}) | |
var accountOne = Account(0); |
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
data = | |
a: 0 | |
b: "foo" | |
result = _(data).reject((v,k) -> k == 'b') | |
expect(result).toEqual(a: 0) #but fail! it returns: [0] | |
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
Shoes.app width: 800, height: 600 do | |
tick 60 do | |
stop_ticking if @right_player.won? or @left_player.won? | |
alert "Right Player Wins!" if @right_player.won? | |
alert "Left Player Wins!" if @left_player.won? | |
end | |
moving_element :ball do | |
location top: 400, left: 300 |
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 -R1336:localhost:8000 remoteserver | |
Active Internet connections (only servers) | |
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name | |
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1099/sshd | |
tcp 0 0 127.0.0.1:1336 0.0.0.0:* LISTEN 1994/0 | |
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1134/sendmail: acce | |
tcp 0 0 :::22 :::* LISTEN 1099/sshd | |
tcp 0 0 ::1:1336 :::* LISTEN 1994/0 | |
udp 0 0 0.0.0.0:68 0.0.0.0:* 984/dhclient |
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
attack! | |
attack! | |
walk! | |
attack! | |
attack! | |
attack! | |
attack! | |
rest! | |
attack! | |
attack! |
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
walk!,forward,walk!,backward,walk!,forward,attack!,forward,rest!,backward,rest!,forward,rest!,backward,walk!,backward,pivot!,backward,walk!,backward,rest!,backward,walk!,backward,pivot!,backward,walk!,forward,attack!,forward,rest!,backward,walk!,backward,pivot!,forward,rest!,backward,rest!,backward,rest!,backward,walk!,backward,rest!,backward,pivot!,forward,attack!,forward,rest!,backward,attack!,backward,pivot!,forward,rest!,forward,attack!,backward,walk!,backward,pivot!,forward,attack!,forward,walk!,backward,walk!,forward,rest!,backward,rest!,forward,rest!,backward,attack!,backward,walk!,backward,attack!,forward,rest!,forward,rest!,forward,attack!,backward,attack!,backward,walk!,forward,attack!,forward,rest!,backward,rest!,forward,attack!,backward,walk!,backward,walk!,forward,pivot!,backward,walk!,forward,rest!,forward,attack!,backward,pivot!,backward,attack!,backward,walk!,forward,rest!,backward,pivot!,forward,walk!,backward,walk!,backward,walk!,backward,pivot!,forward,walk!,backward,pivot!,forward,pivot!,f |