Skip to content

Instantly share code, notes, and snippets.

App.ScoutsNewRoute = Ember.Route.extend
model: ->
console.log 'Calling model() of ScoutsNewRoute'
App.Scout.createRecord()
events:
submit: (scout) ->
console.log('route submit', scout)
@transitionTo 'scouts'
# THEME
set -g status-bg black
set -g status-fg white
set -g status-interval 60
set -g status-left-length 30
set -g status-left '#[fg=green](#S) #(whoami)@#H#[default]'
set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=blue]%H:%M#[default]'
@ramontayag
ramontayag / gist:5079630
Last active December 14, 2015 11:29
ubuntu tmux config
# Make it use C-a, similar to screen..
unbind C-b
unbind l
set -g prefix C-a
bind-key C-a last-window
# Reload key
bind r source-file ~/.tmux.conf
set -g default-terminal "screen-256color"
[2012-12-29T10:15:44+01:00] WARN: remote_file is deprecated for fetching files from cookbooks. Use cookbook_file instead
[2012-12-29T10:15:44+01:00] WARN: From remote_file[/var/lib/postgresql/9.2/main/server.crt] on /tmp/chef-solo/cookbooks/postgresql/recipes/server_debian.rb:84:in `block in from_file'
================================================================================
Error executing action `create` on resource 'remote_file[/var/lib/postgresql/9.2/main/server.crt]'
================================================================================
Chef::Exceptions::FileNotFound
------------------------------
Cookbook 'postgresql' (1.0.1) does not contain a file at any of these locations:
@ramontayag
ramontayag / gist:4307252
Created December 16, 2012 13:27
postgresql chef error on server recipe
/tmp/chef-solo/cookbooks/rvm/libraries/rvm_chef_user_environment.rb:51: warning: class variable access from toplevel
================================================================================
Recipe Compile Error in /tmp/chef-solo/cookbooks/postgresql/recipes/server.rb
================================================================================
NameError
---------
uninitialized constant Chef::Recipe::Opscode
@ramontayag
ramontayag / gist:4064226
Created November 13, 2012 05:58
Capybara that is cucumber-like

From what I understood this morning, the concern Steve had was to be able to use the acceptance specs as a communication tool with the clients, whether directly (the clients read it) or indirectly (the clients do not read it).

The concern from me (at least) is the maintainability of the Cucumber steps. Here are some example:

  • Projects where there were so many cucumber steps that it became hard to figure out what each step did
  • Projects that tried to be too DRY with the steps the regexps became difficult to handle
  • Projects where a lot of set up was required, and the steps to create the users like became long and too descriptive (Given an active user exists that last logged in 2 years ago)
  • Projects whose Cuke steps shared World-wide variables (@project) that were used across steps

For me, using Capybara directly solves this. But, I must agree that only developers can read them. Why not have the best of both worlds?

@ramontayag
ramontayag / gist:3136494
Created July 18, 2012 14:26
Bundler not able to solve
Bundler could not find compatible versions for gem "redis":
In Gemfile:
resque (>= 0) ruby depends on
redis (< 3.0.0) ruby
resque-scheduler (= 2.0.0) ruby depends on
redis (3.0.1)
@ramontayag
ramontayag / gist:2939644
Created June 16, 2012 02:16
Apartment tests
Apartment::Adapters::Mysql2Adapter
it should behave like a generic apartment adapter
#create
should create the new databases
should load schema.rb to new schema
should yield to block if passed and reset
#drop
should remove the db
#process
should connect
[{"model":{"name":"My name","description":"Description goes here!","vote_score":null},"context":{}}]
@ramontayag
ramontayag / gist:1955727
Created March 2, 2012 04:38
brew install macvim trace
==> Downloading https://github.com/b4winckler/macvim/tarball/snapshot-64
File already downloaded in /Users/dev/Library/Caches/Homebrew
==> ./configure --with-features=huge --with-tlib=ncurses --enable-multibyte --with-macarchs=x86_64 --enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-tclinterp
==> cd src/MacVim/icons && make getenvy
==> make
Starting make in the src directory.
If there are problems, cd to the src directory and run make there
cd src && make first
mkdir objects
CC="gcc -Iproto -DHAVE_CONFIG_H -DMACOS_X_UNIX -no-cpp-precomp -I/usr/X11/include -I/System/Library/Frameworks/Tcl.framework/Headers -D_REENTRANT=1 -D_THREAD_SAFE=1 -D_DARWIN_C_SOURCE=1 " srcdir=. sh ./osdef.sh