Skip to content

Instantly share code, notes, and snippets.

View devth's full-sized avatar
Hacking on @yetibot

Trevor Hartman devth

Hacking on @yetibot
View GitHub Profile
$(function(){
initMap();
polyStuff();
function initMap() {
// this is where all your init code goes
}
function polyStuff() {
@var = "hello
this is a very long string
it doesn't seem to put any
returns in it";
@devth
devth / about.md
Created August 9, 2011 16:58 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@devth
devth / set_env.sh
Created August 18, 2011 04:42 — forked from wayneeseguin/gist:774785
zsh chpwd example
my_chpwd()
{
if [[ -s "$PWD/.set_env" ]] ; then
source "$PWD/.set_env"
echo '(automatically sourced .set_env)'
fi
}
add-zsh-hook chpwd my_chpwd
:password => ENV['password'] || 'asdf'
var facets = [{facetValue: { value: 1, count: 10 }}, {facetValue: {value: 2, count: 7}}];
_.pluck(_.pluck(facets, "facetValue"), "value");
provide 'jQuery', this.$
provide 'underscore', this._
provide 'backbone', this.Backbone
@providers = new plumage.display.model.Providers(
for provider in plumage.bootstrap.providers
new plumage.display.model.Provider {id: provider.id, providerName: provider.name}
)
:dependencies [[org.clojure/clojure "1.3.0"],
[org.clojars.adamwynne/http.async.client "0.4.1"]
[org.danlarkin/clojure-json "1.2-SNAPSHOT"]
[robert/hooke "1.1.2"]]
:dev-dependencies [[org.clojars.scott/lein-nailgun "1.1.0"]]
; synchronous api call helper
(defmacro with-client [uri verb-fn & body]
`(with-open [~'client (client/create-client)]
(let [~'response (~verb-fn ~'client ~uri :auth auth)]
~@body)))
; helpers
(def job-names
(memoize
(fn []