These commands are good as of 2011-07-27.
App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.
| # .railsrc for Rails 3, encoding: utf-8 | |
| # see http://rbjl.net/49-railsrc-rails-console-snippets | |
| if !Rails.application then warn "Rails isn't loaded, yet... skipping .railsrc" else | |
| # # # | |
| def ripl?; defined?(Ripl) && Ripl.instance_variable_get(:@shell); end | |
| # # # | |
| # loggers |
| # Add this | |
| public/javascripts/all.js |
| #!/bin/bash | |
| #Based on http://railsapps.github.com/installing-rails-3-1.html | |
| cd ~ | |
| sudo apt-get -y install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev curl git-core | |
| bash < <(curl -sk https://rvm.beginrescueend.com/install/rvm) | |
| echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile |
| heroku addons:add pgbackups --remote staging | |
| heroku addons:add pgbackups --remote production | |
| heroku pgbackups:capture --remote production | |
| heroku pgbackups:restore DATABASE `heroku pgbackups:url --remote production` --remote staging |
| Original Source: https://github.com/chneukirchen/styleguide | |
| = Christian Neukirchen's Ruby Style Guide | |
| You may not like all rules presented here, but they work very well for | |
| me and have helped producing high quality code. Everyone is free to | |
| code however they want, write and follow their own style guides, but | |
| when you contribute to my code, please follow these rules: | |
| $ cd /usr/src | |
| $ wget http://nginx.org/download/nginx-0.8.52.tar.gz | |
| $ tar xzvf ./nginx-0.8.52.tar.gz | |
| $ rm ./nginx-0.8.52.tar.gz | |
| $ gem install s3sync capistrano capistrano-ext passenger --no-ri --no-rdoc | |
| $ passenger-install-nginx-module | |
| # Automatically download and install Nginx? 2. No: I want to customize my Nginx installation | |
| # Where is your Nginx source code located?: /usr/src/nginx-0.8.52 | |
| # Where do you want to install Nginx to?: /opt/nginx |
| # My ./config directory in silverstripe looks like this: | |
| # ./503.php <- a 503 Maintainance page | |
| # ./_ss_environment.php <- the production environment settings | |
| # ./deploy.rb <- is the recipe below | |
| # | |
| # Application settings | |
| set :application, "domain.com" | |
| set :shared_children, %w(assets) |
| $config = { | |
| "application" => "DOMAIN.TLD", | |
| "repository" => "git@GITHOST:USERNAME/REPOSITORYNAME.git", | |
| "remoteusername" => "REMOTEUSERNAME", | |
| "cake_folder" => "/PATH/TO/CAKE", | |
| "cake_version" => "cakephp1.3", | |
| "plugin_dir" => "plugins", | |
| "servers" => { | |
| "prod" => { | |
| "server" => "APPLICATION.TLD", |
| # app/models/user.rb | |
| class User < ActiveRecord::Base | |
| end | |
| # lib/user_logger.rb | |
| module UserLogger | |
| def self.included(mod) | |
| mod.send :after_create, :log_creation | |
| end |
These commands are good as of 2011-07-27.
App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.