Skip to content

Instantly share code, notes, and snippets.

View carlzulauf's full-sized avatar

Carl Zulauf carlzulauf

  • Unabridged Software
  • Denver, CO
View GitHub Profile
@carlzulauf
carlzulauf / postgresql.conf
Created August 9, 2011 22:29
PostgreSQL configuration file for a development environment
data_directory = '/var/lib/postgresql/9.0/main'
hba_file = '/etc/postgresql/9.0/main/pg_hba.conf'
ident_file = '/etc/postgresql/9.0/main/pg_ident.conf'
external_pid_file = '/var/run/postgresql/9.0-main.pid'
#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------
@carlzulauf
carlzulauf / Rakefile
Created October 5, 2011 17:44
Rake task to install dot files into home directory as symlinks
require 'rake'
desc "Install dot files as symbolic links"
task :install do
dots = File.join(Dir.getwd, "home")
home = Dir.home
backup = File.join(home, ".backup-dotfiles")
Dir.mkdir(backup) unless File.directory?(backup)
files = Dir.entries(dots) - [".", ".."]
files.each do |file|
@carlzulauf
carlzulauf / .tmux.conf
Created October 13, 2011 01:41
my tmux config
# definitely DON'T use Ctrl+b. lame.
unbind C-b
# Ctrl+a is a safe choice, I guess
# set -g prefix C-a
# I never use the Insert key on the console, but it is a bit of a stretch
# set -g prefix IC
# ` is a cool prefix
set -g prefix `
@carlzulauf
carlzulauf / redis.conf
Created October 18, 2011 23:02
Redis upstart script (/etc/init/)
description "redis server"
start on runlevel [2345]
stop on shutdown
exec /opt/redis/redis-server /opt/redis/redis.conf
respawn
@carlzulauf
carlzulauf / redis.conf
Created November 16, 2011 00:45
redis config file for development environment
# Redis configuration file example
# Note on units: when memory size is needed, it is possible to specifiy
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes
@carlzulauf
carlzulauf / Base File.sublime-settings
Created November 24, 2011 02:30
Customized Sublime Text 2 file settings
// This goes in ~/.config/sublime-text-2/Packages/User/Base File.sublime-settings
{
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",
// The number of spaces a tab is considered equal to
"tab_size": 2,
// Set to true to insert spaces when tab is pressed
"translate_tabs_to_spaces": true
}
@carlzulauf
carlzulauf / Default (Linux).sublime-keymap
Created November 24, 2011 02:32
Sublime Text 2 custom keymap file
// This goes in ~/.config/sublime-text-2/Packages/User/Default (Linux).sublime-keymap
[
{ "keys": ["ctrl+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+down"], "command": "select_lines", "args": {"forward": true} },
{ "keys": ["alt+shift+up"], "command": "scroll_lines", "args": {"amount": 1.0 } },
{ "keys": ["alt+shift+down"], "command": "scroll_lines", "args": {"amount": -1.0 } }
]
@carlzulauf
carlzulauf / .gitconfig
Created December 7, 2011 19:16
awesome git shortcuts
[user]
name = Carl Zulauf
email = [email protected]
[alias]
st = status
d = diff
co = checkout
ci = commit -v
cia = commit -v -a
b = branch
@carlzulauf
carlzulauf / sample.rb
Created January 22, 2012 06:07
searching by second element in an array of arrays
ruby-1.9.2-p290 :073 > Sample::LANGUAGES.select{|e| e[1] == "text/html"}.any?
=> true
ruby-1.9.2-p290 :074 > Sample::LANGUAGES.select{|e| e[1] == "text/htmld"}.any?
=> false
@carlzulauf
carlzulauf / dashboard.yml
Created January 25, 2012 03:43
dashboard config loader
development:
user:
home: http://example.com
some link: http://someplace.com
admin:
home: http://admin.example.com