Ubuntu 12.10 setup (rbenv/RVM, Janus, PostgreSQL)
- Some utilities:
sudo apt-get install vim tmux git curl- Copy/paste from the command line:
| #!/bin/bash | |
| # License: Public Domain. | |
| # Author: Joseph Wecker, 2012 | |
| # | |
| # -- DEPRICATED -- | |
| # This gist is slow and is missing .bashrc_once | |
| # Use the one in the repo instead! https://github.com/josephwecker/bashrc_dispatch | |
| # (Thanks gioele) | |
| # | |
| # Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile? |
| require 'openssl' | |
| require 'Base64' | |
| key = "secret-key" | |
| data = "some data to be signed" | |
| Base64.encode64(OpenSSL::HMAC.digest(OpenSSL::Digest::Digest.new('sha256'), key, data)).strip() |
sudo apt-get install vim tmux git curl| #!/bin/bash | |
| # Requirements: sed, grep, curl, pkill | |
| # User configuration | |
| LOCAL_INSTALL="/usr/lib/sublime-text-2" # Must be user-writable | |
| REPO="dev" # "dev" for dev releases, or "2" for beta releases | |
| TARGET_BUILD="Linux 32 bit" # can be one of "Windows", "Windows 64 bit", "OS X", "Linux 32 bit", "Linux 64 bit" | |
| # Check if sublime text is running |
| class ApplicationController < ActionController::Base | |
| before_filter :ensure_proper_protocol | |
| protected | |
| def ssl_allowed_action? | |
| (params[:controller] == 'users/sessions' && ['new', 'create'].include?(params[:action])) || | |
| (params[:controller] == 'users/registrations' && ['new', 'create', 'edit', 'update'].include?(params[:action])) || | |
| (params[:controller] == 'users/omniauth_callbacks') | |
| end |
| # RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
| # defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
| module Player | |
| describe MovieList, "with optional description" do | |
| it "is pending example, so that you can write ones quickly" | |
| it "is already working example that we want to suspend from failing temporarily" do | |
| pending("working on another feature that temporarily breaks this one") |