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
alias i from IPython.Shell import IPShellEmbed as IPSh; IPSh(argv='')() |
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
# You like me. | |
curl -X POST -d 'yes=1&me=girl' 'http://localhost:5000/heygirlilikeartsybakedgoodstoo/cvan' | |
# I like you. | |
curl -X POST -d 'yes=1&me=cvan' 'http://localhost:5000/heygirlilikeartsybakedgoodstoo/girl' | |
# In mine. | |
curl 'http://localhost:5000/heygirlilikeartsybakedgoodstoo/cvan' | |
curl 'http://localhost:5000/heygirlilikeartsybakedgoodstoo/cvan?unread' |
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
git branch --track desktop origin/desktop | |
git checkout master | |
git pull --rebase | |
git checkout - | |
git merge master | |
git push origin desktop |
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
# Install homebrew. | |
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" | |
# Acquire compiled dependencies. | |
brew install python libxml2 mysql libmemcached openssl swig jpeg redis elasticsearch | |
# Start services. | |
mkdir -p ~/Library/LaunchAgents | |
ln -nfs /usr/local/Cellar/mysql/*/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/ | |
ln -nfs /usr/local/Cellar/redis/*/homebrew.mxcl.redis.plist ~/Library/LaunchAgents/ |
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
// Usage : less2stylusDir('../src/css/'); | |
var fs = require('fs'); | |
// this less 2 stylus conversion script make a stylus easy to read syntax | |
// - let the braces | |
// - replace the @ for var as $ | |
// - let semicolons | |
function less2stylus(less) |
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
{ | |
"name": "servers", | |
"windows": [ | |
{ | |
"name": "zamboni", | |
"command": ". ~/s/z-runserver" | |
}, { | |
"name": "solitude", | |
"command": ". ~/s/s-runserver" | |
}, { |
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 file in `git diff-tree --no-commit-id --name-only -r HEAD | sort | uniq` | |
do | |
if [ ${file: -3} == ".py" ] | |
then | |
flake8 --ignore=E121,E123,E124,E125,E126,E127,E128 $file | |
fi | |
if [ ${file: -3} == ".js" ] | |
then | |
jshint $file | |
fi |
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
{ | |
"origin": "app://marketplace.firefox.com", | |
"installOrigin": "https://marketplace.firefox.com", | |
"manifestURL": "https://marketplace.firefox.com/minifest.webapp?carrier=telefonica", | |
"type": "web", | |
"removable": false | |
} |
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
$.fn.serializeObject = function() { | |
var data = {}; | |
_.each($(this).serializeArray(), function(v, k) { | |
k = v.name; | |
v = v.value; | |
if (_.contains(k, '__prefix__')) { | |
return; | |
} | |
if (k.match(/\-\d+\-/g)) { | |
// Turn `users-0-name=Basta` into |
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
window.addEventListener('keydown', function(e) { | |
if (e.keyCode == 82 && e.metaKey) { | |
window.location.reload(); | |
} | |
}); |