save_and_open_page
have_button(locator)
module FactoryGirl | |
module Strategy | |
class Cache | |
def association(runner) | |
runner.run(:cache) | |
end | |
def result(evaluation) | |
repository.read(evaluation) || repository.store(evaluation) | |
end |
# .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 |
<? | |
class Email{ | |
private $serverConfig; | |
private $errors; | |
private $log; | |
public function __construct ($serverConfig = array()) { | |
$this->serverConfig = array_merge_recursive(array( | |
"host" => "smtp.seuapp.com.br", | |
"port" => "25", |
I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).
In Vim I have key bindings C-h/j/k/l
set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W
.) I'd like to use the same keystrokes for switching tmux panes.
An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\
.
Here's how it should work:
#!/bin/bash | |
set -e | |
set -x | |
provision_command="wget -O- https://gist.github.com/sobrinho/4774041 | sh" | |
ssh root@server1 "$provision_command" | |
ssh root@server2 "$provision_command" |
cd | |
git clone git://github.com/sstephenson/rbenv.git .rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
exec $SHELL | |
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc | |
exec $SHELL |
(function(root, factory) { | |
if (typeof define === 'function' && define.amd) { | |
define(['backbone.marionette', 'backbone.radio', 'underscore'], function(Marionette, Radio, _) { | |
return factory(Marionette, Radio, _); | |
}); | |
} | |
else if (typeof exports !== 'undefined') { | |
var Marionette = require('backbone.marionette'); | |
var Radio = require('backbone.radio'); | |
var _ = require('underscore'); |
Backbone.Marionette.Renderer.render = function (template, data) { | |
if (_.isObject(template) && template.type === "handlebars") { | |
return template.template(_.extend(data, template.data), template.options); | |
} | |
return template(data); | |
}; |