Skip to content

Instantly share code, notes, and snippets.

View nfelger's full-sized avatar

Niko Felger nfelger

View GitHub Profile
#!/bin/sh
# Take the command to execute from the command line.
command=$@
# Default to updating the project if no command given.
[ -z "$command" ] && command='git pull --rebase ; git submodule init && git submodule update'
# Colors.
boldgreen=$(tput bold)$(tput setaf 2)
colorreset=$(tput sgr0)
Anything from http://www.martinkahr.com/2006/02/13/mac-keys-for-eclipse/, so:
Command-Left/Right: Beginning/end of line
Command-Up/Down: Beginning/end of document
Option-Left/Right: Previous/next word
Option-Up/Down: Page up/down
Option-Page up/Page down: Page up/down
Command-G: Find next
Command-Shift-G: Find previous
Plus:
require 'rubygems'
require 'fsevents'
STDOUT.sync = true
project = ARGV[0] || 'skweb'
options = {
:directory_to_watch => "/Users/nfelger/dev/songkick/#{project}",
:remote_host => 'of1-dev-nfelger',
require 'sequel'
class Configuration
# ... logic for finding configuration strings for different environments / applications.
def self.datastore
@datastore ||= Sequel.connect(connection_uri)
end
end