As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/usr/bin/env ruby -w | |
## Using ruby's standard OptionParser to get subcommand's in command line arguments | |
## Note you cannot do: opt.rb help command | |
## other options are commander, main, GLI, trollop... | |
# run it as | |
# ruby opt.rb --help | |
# ruby opt.rb foo --help | |
# ruby opt.rb foo -q | |
# etc |
require 'active_record' | |
ActiveRecord::Base.logger = Logger.new(STDERR) | |
ActiveRecord::Base.colorize_logging = false | |
ActiveRecord::Base.establish_connection( | |
:adapter => "sqlite3", | |
:dbfile => ":memory:" | |
) |
>> IF = -> b { b } | |
=> #<Proc:0x007fb4e4049cc8 (lambda)> | |
>> LEFT = -> p { p[-> x { -> y { x } } ] } | |
=> #<Proc:0x007fb4e403d680 (lambda)> | |
>> RIGHT = -> p { p[-> x { -> y { y } } ] } | |
=> #<Proc:0x007fb4e4028ff0 (lambda)> | |
>> IS_EMPTY = LEFT |
As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/bin/sh | |
# Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh | |
set -e | |
# Must be a valid filename | |
NAME=foo | |
PIDFILE=/var/run/$NAME.pid | |
#This is the command to be run, give the full pathname | |
DAEMON=/usr/local/bin/bar |
# From http://garmoncheg.blogspot.com/2012/06/pretty-git-log.html | |
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --" |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
ACTION | |
AD_HOC_CODE_SIGNING_ALLOWED | |
ALTERNATE_GROUP | |
ALTERNATE_MODE | |
ALTERNATE_OWNER | |
ALWAYS_SEARCH_USER_PATHS | |
ALWAYS_USE_SEPARATE_HEADERMAPS | |
APPLE_INTERNAL_DEVELOPER_DIR | |
APPLE_INTERNAL_DIR | |
APPLE_INTERNAL_DOCUMENTATION_DIR |