(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
| # Avoid annoying ActionController::UnknownHttpMethod exceptions like: | |
| # | |
| # ActionController::UnknownHttpMethod) "CONNECT, accepted HTTP methods are get, head, put, post, delete, and options" | |
| # | |
| # Install this file in app/metal and these requests will receive a 405 | |
| # "Method Not Allowed" status and will be logged under `info'. | |
| class IgnoreUnknownHttpMethod | |
| def self.call(env) | |
| [ | |
| if ActionController::Request::HTTP_METHODS.include?(env["REQUEST_METHOD"].downcase) |
| Rails.application.routes.draw do | |
| get '/(:locale)/products/(:category)/(page/:page).:extension', | |
| :to => 'products#index', | |
| :as => :products, | |
| :constraints => { | |
| :locale => /[a-z]{2}/, | |
| :category => /.+?/, | |
| :page => /\d+/ | |
| }, |
| # Install pow | |
| $ curl get.pow.cx | sh | |
| # Install powder | |
| $ gem install powder | |
| # See that firewall is fucked | |
| $ sudo ipfw show | |
| 00100 0 0 fwd 127.0.0.1,20559 tcp from any to me dst-port 80 in <- THIS ONE!!! | |
| 65535 81005 28684067 allow ip from any to any |
| ## keybindings | |
| unbind C-b | |
| unbind C-a | |
| unbind % | |
| unbind , | |
| unbind . | |
| unbind n | |
| unbind p | |
| unbind [ | |
| unbind '"' |
| #!/bin/sh | |
| # Default acpi script that takes an entry for all actions | |
| minspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq` | |
| maxspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq` | |
| setspeed="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed" | |
| set $* | |
| case "$1" in |
| {-# LANGUAGE TypeSynonymInstances, DeriveDataTypeable, MultiParamTypeClasses, NoMonomorphismRestriction #-} | |
| -- Ty Levad - tylevad@gmail.com | |
| -- xmonad.hs | |
| -- Core Modules | |
| import System.Exit | |
| import XMonad hiding ((|||)) | |
| import qualified XMonad.StackSet as W | |
| -- Action Modules |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: