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
#!/bin/bash | |
echo "Bash version ${BASH_VERSION}..." | |
cd ~/.vim/bundle | |
for plugin in ~/.vim/bundle/* | |
do | |
echo "Updating $plugin" | |
( cd $plugin; git pull --rebase origin master ) | |
echo "DONE!" |
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
var fork = require('child_process').fork; | |
if (process.argv[2] == 'son') { | |
setTimeout(function() { | |
process.send({ result: 'hi dad' }); | |
process.exit(0); | |
}, 1000); | |
} else { | |
var child = fork(__filename, [ 'son' ]); | |
child.on('message', function(m) { |
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
require 'pp' | |
votes = { | |
"gus" => ["Colonel Panic", "Cigar Heroes"], | |
"shinji" => ["Bomb Squad","Taco Town"], | |
"nawara" => ["Colonel Panic", "Taco Town", "Danger!! Death Ray"], | |
"dodos" => [], | |
"richie" => [], | |
"colin" => ["Colonel Panic", "Taco Town"], | |
"joey" => ["Danger!! Death Ray", "Bomb Squad"] |
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 (a-plus-abs-b a b) | |
((if (> b 0) + -) a b)) | |
( a-plus-abs-a-b 5 6 ) ; method invocation | |
((if (> 6 0) + -) 5 6) ; method with paramters filed in | |
((+) 5 6) ; evaluate the if statemnt | |
(+ 5 6) | |
11 | |
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 ( sum-of-squares x y ) | |
(+ (* x x) (* y y)) | |
) | |
( define ( exercise_answer x y z ) | |
( if ( > x y ) | |
( if ( > y z ) | |
( sum-of-squares x y ) | |
( sum-of-squares x z ) | |
) |
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
(5 + 4 + (2 - (3 - (6 + 4/5)))) / (3 * (6-2) * (2 - 7)) | |
(+ 5 4 (2 - (3 - (6 + 4/5)))) / (3 * (6-2) * (2 - 7)) # prefix first set of addition | |
(+ 5 4 (- 2 (- 3 (+ 6 (/ 4 5)))) / (3 * (6-2) * (2 - 7)) # prefix entire left side | |
(+ 5 4 (- 2 (- 3 (+ 6 (/ 4 5)))) / (* 3 (- 6 2) (- 2 7)) # prefix right side | |
(/ (+ 5 4 (- 2 (- 3 (+ 6 (/ 4 5))))) (* 3 (- 6 2) (- 2 7)) ) # prefix the rest |
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
SICP 1.2 | |
Fork me. Solve me. |