start new:
tmux
start new with session name:
tmux new -s myname
#!/bin/sh | |
ProgName=$(basename $0) | |
sub_help(){ | |
echo "Usage: $ProgName <subcommand> [options]\n" | |
echo "Subcommands:" | |
echo " bar Do bar" | |
echo " baz Run baz" | |
echo "" |
server { | |
index index.php; | |
set $basepath "/var/www"; | |
set $domain $host; | |
# check one name domain for simple application | |
if ($domain ~ "^(.[^.]*)\.dev$") { | |
set $domain $1; | |
set $rootpath "${domain}"; |
Setup vagrant vm
vagrant box add precise64 http://files.vagrantup.com/precise64.box
vagrant init precise64
sed -i 's/# config.vm.network :hostonly/config.vm.network :hostonly/' Vagrantfile
vagrant up
vagrant ssh
Install base software and apache (to have something to proxy)
vagrant box add smartos http://cuddletech.com/tmp/smartos-latest.box | |
mkdir smartos && cd smartos | |
vagrant init smartos | |
vagrant up | |
vagrant ssh |
function! ReloadChrome() | |
execute 'silent !osascript -e "tell application \"Google Chrome\" to tell the active tab of its first window" ' . | |
\'-e "execute javascript \"window.location.reload();\" " ' . | |
\'-e "end tell" >/dev/null' | |
execute 'silent !clear' | |
endfunction | |
nnoremap <leader>o :call ReloadChrome()<CR><CR>k | |
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "make an instance, based on region, subnet, and security group. Uses AMI Mapping for Instance Store backed Amazon Linux 64bit in the region specified", | |
"Parameters" : { | |
"InstanceType" : { | |
"Description" : "Type of Instance to use, defaults to m1.medium", | |
"Type" : "String", |
#!/bin/bash | |
# | |
# Copyright 2013 John Leach <[email protected]> | |
# | |
# Distributed under terms of the MIT license | |
# | |
# Takes a screeshot using scrot and uploads it via scp and sticks the | |
# url on the clipboard as quickly as possible. | |
# | |
# For speed, it cheats and puts the url on the clipboard *before* |
#! /usr/bin/python | |
from boto import ec2; | |
import boto.utils | |
import argparse | |
def parsed_args(): | |
parser = argparse.ArgumentParser() | |
parser.add_argument("-i", "--instance_id", | |
help="the instance id you want to snapshot. default: current instance id", |
# Twilio HTTP HAProxy Configuration | |
# Version: 0.1 | |
global | |
daemon | |
log 127.0.0.1 local0 info | |
maxconn 60000 | |
spread-checks 3 | |