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
# directory-jumper { | |
# http://jeroenjanssens.com/2013/08/16/quickly-navigate-your-filesystem-from-the-command-line.html | |
export MARKPATH=$HOME/.marks | |
function j { | |
cd -P $MARKPATH/$1 2>/dev/null || echo "No such mark: $1" | |
} | |
function j-mark { | |
mkdir -p $MARKPATH; ln -s $(pwd) $MARKPATH/$1 | |
} | |
function j-unmark { |
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 username = $(".add-user"); | |
var avatar = username.parent().find(".avatar"); | |
username | |
.asEventStream("keyup") | |
.map(function(event) { return $(event.target).val() }) | |
.debounce(500) | |
.flatMapLatest(function(u) { | |
return Bacon.fromPromise($.ajax("https://api.github.com/users/" + u)); | |
}) |
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 -e | |
DATE=$(date +"%d-%m-%Y-%H-%M-%S") | |
SCREENSHOT_PATH=~/Dropbox/Public/screenshots/screenshot-$DATE.png | |
DROPBOX_URL=https://dl.dropboxusercontent.com/u/1207191/screenshots/screenshot-$DATE.png | |
shutter --select --exit_after_capture --no_session --output $SCREENSHOT_PATH | |
echo $DROPBOX_URL | xclip -selection c | |
notify-send "Stored screenshot in dropbox" |
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
" let g:github_user = $GITHUB_USER | |
" let g:github_token = $GITHUB_TOKEN |
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
package main | |
import ( | |
"time" | |
) | |
func main() { | |
list := make([]int32, 60000000, 60000000) | |
for i := 0; i < 60000000; i++ { | |
list = append(list, int32(i)) |
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
export LAST_EXIT_CODE=$? | |
echo EXIT CODE: $LAST_EXIT_CODE | |
if [ $LAST_EXIT_CODE -ne 0 ]; then | |
exit 1 | |
fi |
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
Client version: 0.6.6 | |
Go version (client): go1.2rc3 | |
Git commit (client): 6d42040 | |
Server version: 0.6.6 | |
Git commit (server): 6d42040 | |
Go version (server): go1.2rc3 | |
Last stable version: 0.6.6 |
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 starred_product? id | |
all_stars = stars | |
all_stars.any? {|star| star.product_id == id } | |
# stars.find_by_product_id(id).present? | |
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
# rails { | |
# Make rails boot faster | |
export RUBY_HEAP_MIN_SLOTS=1000000 | |
export RUBY_HEAP_SLOTS_INCREMENT=1000000 | |
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
export RUBY_GC_MALLOC_LIMIT=100000000 | |
export RUBY_HEAP_FREE_MIN=500000 | |
# } |