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
So, I'm setting up a new Ubuntu 10.04 server with nginx, RVM, Ruby-1.9.1, and Thin. | |
I got through installing nginx, RVM, ruby-1.9.1 without any problems. | |
Ruby-1.9.1 was installed using 'rvm install x'; | |
I don't have a system Ruby (Which is what I've been doing previously). | |
I've also set the default ruby to 1.9.1 for myself and root. | |
I installed the thin gem using 'gem install thin' | |
I then installed thin to the system using | |
'thin install' |
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
yum groupinstall "Development Tools" |
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
var isVisible = false; | |
function onVisible() { | |
isVisible = true; | |
jQuery.getScript("http://www.google-analytics.com/ga.js"); | |
} | |
if ( document.webkitVisibilityState === undefined || document.webkitVisibilityState === "visible" ) { | |
onVisible(); | |
} else { | |
jQuery.bind( "webkitvisibilitychange", function() { |
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
#["",nil,"something","another",123,""] => ["something","another",123] | |
array_to_filter.reject &:empty? |
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
#Create a hash like {1=>2, 3=>4} from Array of values | |
arr = [1,2,3,4] | |
hash = Hash[*arr] |
NewerOlder