git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
/** | |
* Underscore mixin to merge objects; last item takes precedence (uses _.extend not _.default) | |
**/ | |
_.mixin({ | |
merge : function() { | |
return _.reduce(arguments, function(list, obj){ | |
return _.extend(list, obj); | |
}, {}); | |
} |
# define a record, first attribute is considered the key | |
defrecord User, email: "", first: "", last: "" | |
# encapsulates mnesia calls | |
defmodule Database do | |
def create_schema do | |
create_table User | |
end | |
def find(record, id) do |
import static groovy.json.JsonOutput.* | |
def config = ['test': 'lalala'] | |
println prettyPrint(toJson(config)) |
(def my-topic (pubsub/topic 100)) | |
(pubsub/subscribe-go | |
[subscription my-topic (sliding-buffer 100)] | |
(loop [] | |
(when-let [ev (<! subscription)] | |
(prn [:sub-got ev]) | |
(recur)))) | |
;; without go |
eventsource | |
go-eventsource | |
client/client |
// Run Jetty on dependency resolved war file | |
// | |
// you can run multiple wars with different configuration by | |
// adding more task definitions. | |
// | |
import org.gradle.api.plugins.jetty.JettyRunWar | |
apply plugin: 'java' | |
apply plugin: 'jetty' |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
(defmacro deftestpackage (package-name for-package &optional (test-library-package-name :unit-test)) | |
"Define a new package PACKAGE-NAME used to test the package | |
designated by FOR-PACKAGE. The new package will import all symbols | |
from FOR-PACKAGE and :USE the package designated by | |
TEST-LIBRARY-PACKAGE-NAME which supposedly contains unit testing | |
functions and macros." | |
`(defpackage ,package-name | |
(:use ,test-library-package-name ,@(mapcar #'package-name (package-use-list for-package))) | |
(:import-from ,for-package | |
,@(let (symbols) |
#!/bin/bash | |
# which programs do you want to install into your path? | |
programs=( groovy grails gradle scala ) | |
# relies on the conventions: | |
# 1. all tools go into ~/tools | |
# 2. all tools are configured with a 'current' symlink for | |
# the currently in-use version | |
# 3. all tools have a 'bin' directory |
apply plugin:'groovy' | |
apply plugin:'idea' | |
repositories { mavenCentral() } | |
dependencies { | |
groovy 'org.codehaus.groovy:groovy-all:1.8.4' | |
} | |
task makeDirs(description:'make all dirs for project setup') << { |