This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.6/angular.min.js"></script> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains hidden or 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
// bootstrap-ckeditor-modal-fix.js | |
// hack to fix ckeditor/bootstrap compatiability bug when ckeditor appears in a bootstrap modal dialog | |
// | |
// Include this AFTER both bootstrap and ckeditor are loaded. | |
// From: http://stackoverflow.com/questions/14420300/bootstrap-with-ckeditor-equals-problems | |
// Author: http://stackoverflow.com/users/185839/aaron | |
$.fn.modal.Constructor.prototype.enforceFocus = function() { | |
modal_this = this | |
$(document).on('focusin.modal', function (e) { |
This file contains hidden or 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 hidden or 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 hidden or 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 |
OlderNewer