Skip to content

Instantly share code, notes, and snippets.

@skizzybiz
skizzybiz / app.rb
Created June 2, 2011 21:01
Problems with AR.find
class MainDB::App < ActiveRecord::Base
establish_connection :main_db
set_table_name "APPLICATIONS"
end
@skizzybiz
skizzybiz / console.js
Created September 21, 2011 18:33
Observers for sub-properties don't work when using notifyPropertyChange
X.b.get('prop') // => 0
X.b.setA(X.o)
X.b.get('prop') // => 0
X.b.get('a').get('prop') // => 1
X.b.notifyPropertyChange('prop')
X.b.get('prop') // => 1
@skizzybiz
skizzybiz / .bash_profile
Created September 26, 2012 17:17
Multiline Bash command prompt with user, host, path, git status, right-aligned timestamp.
# Define colors
RESET='\[\033[00m\]'
FGBK='\[\033[0;30m\]' # foreground black
FGRD='\[\033[0;31m\]' # foreground red
FGGN='\[\033[0;32m\]' # foreground green
FGYL='\[\033[0;33m\]' # foreground yellow
FGBL='\[\033[0;34m\]' # foreground blue
FGMG='\[\033[0;35m\]' # foreground magenta
FGCY='\[\033[0;36m\]' # foreground cyan
FGGR='\[\033[0;37m\]' # foreground gray
import com.fasterxml.jackson.annotation.JsonCreator;
import test.protobuf.Test;
public class Wrapper {
public Test.Foo foo;
@JsonCreator
public Wrapper(Test.Foo foo) {
this.foo = foo;
}