Skip to content

Instantly share code, notes, and snippets.

pmantz@interzone:~$ rvm get head && rvm reinstall 1.9.2
Downloading RVM from wayneeseguin branch master
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 938k 100 938k 0 0 991k 0 --:--:-- --:--:-- --:--:-- 991k
Upgrading the RVM installation in /Users/pmantz/.rvm/
RVM PATH line found in /Users/pmantz/.bashrc /Users/pmantz/.zshrc.
RVM sourcing line found in /Users/pmantz/.bash_profile.
pmantz@interzone:~$ rvm get head && rvm reinstall 1.9.2
Downloading RVM from wayneeseguin branch master
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 938k 100 938k 0 0 912k 0 0:00:01 0:00:01 --:--:-- 2306k
Upgrading the RVM installation in /Users/pmantz/.rvm/
RVM PATH line found in /Users/pmantz/.bashrc /Users/pmantz/.zshrc.
RVM sourcing line found in /Users/pmantz/.bash_profile.
pmantz@interzone:~$ printenv | grep COLOR
CLICOLOR=1
COLORFGBG=7;0
CLICOLOR_FORCE=1
pmantz@interzone:~/git/mingle-wrapper$ rails c
Loading development environment (Rails 3.2.2)
1.9.2-p318 :001 > require 'spec_helper'
LoadError: no such file to load -- spec_helper
from /Users/pmantz/.rvm/gems/ruby-1.9.2-p318@mingle-wrapper/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
from /Users/pmantz/.rvm/gems/ruby-1.9.2-p318@mingle-wrapper/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/pmantz/.rvm/gems/ruby-1.9.2-p318@mingle-wrapper/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/pmantz/.rvm/gems/ruby-1.9.2-p318@mingle-wrapper/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
from (irb):1
from /Users/pmantz/.rvm/gems/ruby-1.9.2-p318@mingle-wrapper/gems/railties-3.2.2/lib/rails/commands/console.rb:47:in `start'
@pcmantz
pcmantz / gist:2465838
Created April 22, 2012 18:11
change title of terminal in Screen if we are in a git repository
export PROMPT_COMMAND='[ -d $(pwd)/.git ] && screen -X title "git $(pwd | xargs basename)"'
require 'spec_helper'
require 'cantango/rspec/matchers'
describe GuestRolePermit do
context 'a guest user' do
subject(:guest_user) { FactoryGirl.create(:guest_user) }
context 'acting on a public bundle' do
let(:public_bundle) { FactoryGirl.create(:public_bundle) }
class GuestRolePermit < CanTango::RolePermit
def initialize ability
super
end
protected
def permit_rules
can(:read, [PackageManager, Package, Bundle]) { public_at.present? }
end
(setq default-cursor-color "green")
(setq yasnippet-can-fire-cursor-color "purple" )
;; It will test whether it can expand, if yes, cursor color -> green.
(defun yasnippet-can-fire-p (&optional field)
(interactive)
(setq yas--condition-cache-timestamp (current-time))
(let (templates-and-pos)
(unless (and yas-expand-only-for-last-commands
ELISP> t
t
ELISP> nil
nil
ELISP> false
*** Eval error *** Symbol's value as variable is void: false
create_table(:bundles, :ignore_index_errors=>true) do
primary_key :id
String :name, :size=>255, :null=>false
String :version, :size=>255, :null=>false
Integer :revision, :null=>false
Integer :user_id, :null=>false
DateTime :created_at, :null=>false
DateTime :updated_at, :null=>false
DateTime :public_at