Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.swig505.redis</string>
<key>Program</key>
<string>/usr/local/redis/redis-server</string>
<key>ProgramArguments</key>
<array>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.swig505.mongod</string>
<key>Program</key>
<string>/usr/local/mongodb/bin/mongod</string>
<key>ProgramArguments</key>
<array>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.swig505.memcached</string>
<key>Program</key>
<string>/usr/bin/memcached</string>
<key>ProgramArguments</key>
<array>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.swig505.kestrel</string>
<key>ProgramArguments</key>
<array>
<string>java</string>
<string>-jar</string>
[user]
email = <your-email>
name = <your-name>
[color]
diff = auto
status = auto
branch = auto
[alias]
st = status
co = checkout
rake <options> <tasks> ...;
options = [(-T | --tasks) | (-v | --verbose)] ...;
tasks = ! [ -e .rake_compleat ] && cat .rake_compleat || rake -T | cut -f2 -d' ' | tee .rake_compleat ;
@Lytol
Lytol / selection_sort.scala
Created November 4, 2009 06:45
Selection sort implementation in Scala
// Inmperative version
//
def selectionSort(list: Array[Int]): Unit {
def swap(list: Array[Int], i: Int, j: Int) {
var tmp = list(i)
list(i) = list(j)
list(j) = tmp
}
var i = 0
require 'yaml'
module Rails
module App
extend self
def [](key)
config[key]
end
exception_class: NoMethodError
controller_name: socket7
action_name: create_kid
message: "undefined method `shard_key' for nil:NilClass"
backtrace: [RAILS_ROOT]/app/models/tracker.rb:12:in `shard'
/usr/lib64/ruby/gems/1.8/gems/activerecord-distributed_mysql-adapter-0.1.0/lib/active_record/distributed_mysql_ext.rb:94:in `create_without_callbacks'
[RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/callbacks.rb:254:in `create_without_timestamps'
[RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/timestamp.rb:39:in `create_without_user'
[RAILS_ROOT]/vendor/plugins/userstamp/lib/userstamp.rb:36:in `create'
[RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:1777:in `create_or_update_without_callbacks'
$(document).ready(function(){
// Add a favicon to all links with class name favicon
//
$("a.favicon").each(function() {
this.style.paddingLeft = '25px';
this.style.background = 'transparent url(' + faviconFromLink(this) + ') no-repeat top left';
});
});