(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:
| class Book < Airrecord::Table | |
| class Endorser < Airrecord::Table | |
| self.base_key = "" | |
| self.table_name = "Endorser" | |
| end | |
| self.base_key = "" | |
| self.table_name = "Books" | |
| has_many :endorsements, class: 'Book::Endorser', column: 'Endorsements' |
| #!/bin/bash | |
| # Script to instruct the Mac how to route packets to the | |
| # software defined network where containers created via boot2docker | |
| # reside. This lets you casually directly to ports (ssh, http, etc. etc.) | |
| # on those containers. | |
| function ERROR(){ echo "ERROR: $*" ; } | |
| function FAIL(){ echo "FAILING: $*" ; exit 1; } | |
| if [[ 'running' != $(boot2docker status) ]] | |
| then FAIL "boot2docker's VM not running" ; fi | |
| IP_OF_DOCKER_HOST=$(boot2docker ip 2> /dev/null) |
| scp -i ~/.ssh/id_boot2docker -P 2022 file-to-upload docker@localhost:~ |
| #!/bin/bash | |
| usage () | |
| { | |
| cat <<UsageHERE | |
| boot2docker-fwd -- Helper function to quickly manage port forwards between the boot2docker-vm and the host | |
| Usage: boot2docker-fwd [ -n RULE_NAME ] [ -h HOST_PORT ] [ -p {tcp|udp} ] [ -i HOST_IP ] GUEST_PORT | |
| or boot2docker-fwd -d RULE_NAME | |
| or boot2docker-fwd -l | |
| or boot2docker-fwd -A |
| import paramiko | |
| k = paramiko.RSAKey.from_private_key_file("/Users/whatever/Downloads/mykey.pem") | |
| c = paramiko.SSHClient() | |
| c.set_missing_host_key_policy(paramiko.AutoAddPolicy()) | |
| print "connecting" | |
| c.connect( hostname = "www.acme.com", username = "ubuntu", pkey = k ) | |
| print "connected" | |
| commands = [ "/home/ubuntu/firstscript.sh", "/home/ubuntu/secondscript.sh" ] | |
| for command in commands: | |
| print "Executing {}".format( command ) |
# This example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query string