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
# Testing gistr | |
# http://github.com/blog/137-gist-on-your-tumblr |
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
This example shows how to setup an environment running Rails 3 beta under 1.9.1 with a 'rails3' gem set. | |
∴ rvm update --head | |
# ((Open a new shell)) | |
# If you do not already have the ruby interpreter installed, install it: | |
∴ rvm install 1.9.1 | |
# Switch to 1.9.1 | |
∴ rvm 1.9.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
rvm --trace package install readline | |
--trace package install readline | |
rvm 0.1.23 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/] | |
+ [[ -z '' ]] | |
+ [[ ! -z '' ]] | |
+ [[ ! -z '' ]] | |
+ [[ ! -z '' ]] | |
+ [[ 3 -gt 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
%w(won won won won won won LOST).inject(%w(lucas asis oscar adrian alejo marcos david)) {|acc,s| puts [acc.delete_at(rand(acc.length)),s].join(' ');sleep 3 if acc.length > 1; acc} |
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
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^b w | |
New -s <session> Create ^b c | |
Attach att -t <session> Rename ^b , <name> | |
Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
Kill kill-session -t <session> Close ^b & |
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
# vim:ft=zsh ts=2 sw=2 sts=2 | |
# | |
# agnoster's Theme - https://gist.github.com/3712874 | |
# A Powerline-inspired theme for ZSH | |
# | |
# # README | |
# | |
# In order for this theme to render correctly, you will need a | |
# [Powerline-patched font](https://gist.github.com/1595572). | |
# |
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
.DS_Store |
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
// Function that gets the drawImage required parameters to | |
// resize an image by a scale | |
const getDrawImageParams = (image, scale) => { | |
const {naturalWidth: imageWidth, naturalHeight: imageHeight} = image; | |
return { | |
sx: 0, | |
sy: 0, | |
sWidth: imageWidth, |