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
brew install readline | |
CONFIGURE_OPTS="--disable-install-doc --with-readline-dir=$(brew --prefix readline)" rbenv install 1.9.3-p392 |
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
def twenty_four(*operands) | |
p operands | |
operators = %w(+ - * /) | |
operands.map! {|op| op.to_f} | |
operands.permutation.to_a.uniq.each do |ordered_operands| | |
operators.repeated_permutation(operands.length-1) do |ordered_operators| | |
check_answer(ordered_operands, ordered_operators) | |
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
$ npm install -g yo | |
$ npm install -g generator-fluxible | |
$ yo fluxible |
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
npm install -g yo | |
npm install -g generator-fluxible | |
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
for child in children | |
$('#list').append("<li>#{child.name}</li>").bind 'click', do => | |
tmp = child.id | |
-> check(tmp) | |
# always check the id of last child | |
for child in children | |
$('#list').append("<li>#{child.name}</li>").bind 'click', => check(child.id) |
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
python -m SimpleHTTPServer 8080 |
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
<link rel="stylesheet/less" type="text/css" href="styles.less"> | |
<script src="less.js" type="text/javascript"></script> |
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
"content_scripts": [ | |
{ | |
"matches": ["http://www.xxx.com/*"], | |
"css": ["css/bootstrap.css", "css/content.css"], | |
"js": ["js/jquery.min.js", "js/content.js"] | |
} | |
] |
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
watch('.*\.jade') {|md| system("jade -P -O .. #{md[0]}")} | |
watch('.*\.styl') {|md| system("stylus -o ../css #{md[0]}")} | |
watch('.*\.coffee') {|md| system("coffee -bc -o ../js #{md[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
$.get( "your_partial.html", function( data ) { | |
$( "#your_div" ).html( data ); | |
alert( "Load was performed." ); | |
}); |
OlderNewer