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
import sys | |
import time | |
for i in range(100): | |
sys.stderr.write('\r') | |
sys.stderr.write(str(i)) | |
time.sleep(.01) |
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
nnoremap <Left> :vertical resize +1<CR> | |
nnoremap <Right> :vertical resize -1<CR> | |
nnoremap <Up> :resize +1<CR> | |
nnoremap <Down> :resize -1<CR> | |
" Uncommenting the following line breaks the previous lines | |
" nnoremap <Esc> :nohlsearch<CR> |
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
node_installed = `which npm` | |
if node_installed.empty? | |
execute "cd ~ && wget 'http://nodejs.org/dist/v0.10.25/node-v0.10.25-linux-x64.tar.gz'" | |
execute "cd ~ && tar xvzf node-v0.10.25-linux-x64.tar.gz" | |
execute "cd ~ && mv node-v0.10.25-linux-x64 nodejs" | |
execute "cd /usr/bin/ && ln -s ~/nodejs/bin/node /usr/bin/node" | |
execute "cd /usr/bin/ && ln -s ~/nodejs/bin/npm /usr/bin/npm" | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Media Query Example</title> | |
<meta charset="utf-8" /> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<div id="main-content"> | |
<div class="container"> |
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
:read !xmllint --format % |
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
class DummyMeta(type): | |
@property | |
def thing1(self): | |
return "in thing1" | |
class Dummy(object): | |
__metaclass__ = DummyMeta | |
# thing1 = 'asldfkj' |
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 | |
DONE=() | |
WORKING=`pwd` | |
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
git log --stat --summary --since=2013-06-01 | grep "|" | cut -d "|" -f 1 | sort -u | grep migration |
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
cat ~/.ssh/_config | grep -v 'github' | awk '/^Host/ { if($2 !~ /\*/) print $2;}' | xargs -I host ssh host 'cat /etc/motd' |
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
//rename collection from fs to attachments | |
db.fs.files.renameCollection('attachments.files') | |
db.fs.chunks.renameCollection('attachments.chunks') | |
//move the tags 'AppendToApplication' and 'AgentDownload' to meta_tags | |
db.attachments.files.find({tags: {$exists: true}, meta_tags: {$exists: true}}).forEach(function (e) { | |
var meta_tags = []; | |
if(e.tags.forEach){ |