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(){ | |
var yqlurl= "http://query.yahooapis.com/v1/public/yql?q=" | |
+ "select%20*%20from%20youtube.search%20where%20query%3D" | |
+"'umflint'%20limit%2010&format=json&diagnostics=true&env=" | |
+"store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=?"; | |
// Build this | |
var build = function(data){$.each(data.query.results.video, function(i, video){ | |
$('<h1><a href="' + video.url +' target="_blank\"/></h1>') |
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
{ | |
"query": { | |
"count": 2, | |
"created": "2011-03-11T17:41:29Z", | |
"lang": "en-US", | |
"meta": { | |
"meta": "" | |
}, | |
"results": { | |
"results": [ |
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
# set permissions for apache | |
setPermissions () { | |
sudo chown -R apache $1 | |
sudo chgrp -R web $1 | |
sudo chmod -R 775 $1 | |
} | |
# Hide and show hidden files | |
alias showhidden="defaults write com.apple.finder AppleShowAllFiles TRUE; killall Finder" | |
alias hidehidden="defaults write com.apple.finder AppleShowAllFiles FALSE; killall Finder" |
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 'sinatra' | |
require 'datamapper' | |
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/cal.db") | |
class Event | |
include DataMapper::Resource | |
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 demo = { | |
init : function(){ | |
var query = 'select * from music.artist.id where ids="289282"', | |
url = 'https://query.yahooapis.com/v1/public/yql?q=' | |
+ encodeURIComponent(query) +'&format=json&env=store%3A%2F%2Fdatatables.org' | |
+'%2Falltableswithkeys&callback=?&_maxAge=3000', | |
getIt = demo.getData(url) |
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
newproject () { | |
gem update sass | |
gem update compass | |
gem update haml | |
gem update html5-boilerplate | |
compass create $1 -r html5-boilerplate -u html5-boilerplate --javascript-dir js --css-dir css | |
mvim $1 | |
compass watch $1 | |
} |
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 a = [34,2,121,4,66]; | |
function quickSort(arr){ | |
if (arr.length == 0) | |
return []; | |
var left = [], | |
right = [], | |
pivot = arr[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
.item{ width: 120px; height: 200px; position:relative; background: red; opacity: 0; margin-top:100px; float:left; z-index:9999; margin-right: 20px;} | |
.item_copy{float: left; opacity:0; margin-top:130px; position:relative; z-index:1;} |
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
$('.tag').each(function(i) { | |
setTimeout(function() { | |
$('.tag:eq('+i+')').css({ display: 'block', opacity: 0 }).stop().animate({ opacity: 1 }, 'easeInOutExpo'); | |
}, 250 * (i + 1)) | |
}); |
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 upgrade node | |
Error: undefined method `include?' for nil:NilClass | |
Please report this bug: | |
https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue | |
/usr/local/Library/Homebrew/formula.rb:332:in `canonical_name' | |
/usr/local/Library/Homebrew/formula.rb:364:in `factory' | |
/usr/local/Library/Contributions/examples/brew-upgrade.rb:7 | |
/usr/local/Library/Contributions/examples/brew-upgrade.rb:7:in `map' | |
/usr/local/Library/Contributions/examples/brew-upgrade.rb:7 | |
/usr/local/bin/brew:47:in `require' |
OlderNewer