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 | |
while [ true ]; do | |
git pull origin master | |
bundle install | |
rake db:migrate | |
rake rake:test:prepare | |
rake spec | |
done |
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
############ For Vitual Machines ####### | |
sudo locale-gen en_CA.UTF-8 | |
sudo apt-get install ruby git build-essential | |
############ Run Updates ############ | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
############ Reboot ############ |
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
document.getElementById('youridhere').scrollIntoView(); |
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
IO.foreach("filename.ext") { |line| p line} |
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
Taken from: http://www.joseairosa.com/2009/07/24/easy-css-star-rating-layout/ | |
Images: http://www.joseairosa.com/wp-content/uploads/2009/07/stars.png | |
http://www.joseairosa.com/wp-content/uploads/2009/07/stars_full.png | |
.classification { | |
position: relative; | |
width: 91px; | |
height: 17px; | |
} | |
.classification .cover { |
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
a.a-thumb { | |
border: 1px solid black; | |
position: relative;} | |
a.a-thumb img { | |
width: 60px; | |
height: 60px; | |
border: 0;} | |
a.a-thumb span { | |
background-color: #000000; | |
position: absolute; |
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
#smallest, cleanest code i have seen without curl | |
require 'open-uri' | |
open("http://someplace.com/somefile.mp3") do |in_io| | |
File.open("somefile.mp3", 'w') do |out_io| | |
out_io.print in_io.read | |
end | |
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
sudo port install mercurial | |
hg clone https://vim.googlecode.com/hg/ vim | |
./configure --prefix=/my/install/prefix --enable-rubyinterp --enable-gui=no --disable-gpm | |
make | |
sudo make install | |
## tested on lion | |
## more info: http://nerderati.com/2010/07/compiling-vim-with-ruby-integration-on-snow-leopard/ |
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
<script type="text/javascript"> | |
jQuery(function(){ | |
jQuery('#content div.portfolio,#content div.portfolio-small').hover(function(){ | |
jQuery(this).find('img').fadeTo("fast", 0.5); | |
}, function(){ | |
jQuery(this).find('img').fadeTo("fast", 1.0); | |
}); | |
}); | |
</script> |
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
set :application, "appname" | |
set :domain, "domain.tld" | |
role :web, domain # Your HTTP server, Apache/etc | |
role :app, domain # This may be the same as your `Web` server | |
role :db, domain, :primary => true # This is where Rails migrations will run | |
set :repository, "." # Deploy from the local repository | |
set :scm, "git" | |
set :branch, "master" |