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 |
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" |
(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'); |
### Add those lines after *filter near the beginning of the file | |
:ufw-http - [0:0] | |
:ufw-http-logdrop - [0:0] | |
### Add those lines near the end of the file | |
### Start HTTP ### |
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"REST URL PATH"]]; | |
NSData *imageData = UIImageJPEGRepresentation(image, 1.0); | |
[request setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData]; | |
[request setHTTPShouldHandleCookies:NO]; | |
[request setTimeoutInterval:60]; | |
[request setHTTPMethod:@"POST"]; | |
NSString *boundary = @"unique-consistent-string"; |
# Add the "https://github.com/jwt/ruby-jwt" gem to your "Gemfile" | |
gem 'jwt' |