Skip to content

Instantly share code, notes, and snippets.

View Scriptor's full-sized avatar

Tamreen Khan Scriptor

  • New York City
View GitHub Profile
get 'greet/:name', (request) ->
"Hello " + request.params['name']
becomes
routes = {
'greet/:name': function(request){
return "Hello " + request.params['name'];
}
}
print "yo, dawg"
"yo"
(fn greet-name (name)
(. "Hello, name!"))
(fn [n]
(loop [a 1, b 1, xs [a b]]
(if (= n (count xs))
xs
(recur b (+ a b) (conj xs (+ a b))))))
(defmacro debug-block [& lines]
(let [debugged-lines
(map (fn [line]
(if (list? line)
(conj line 'debug)
line))
lines)]
debugged-lines))
(defmacro debug-block [& lines]
(map (fn [line]
(if (list? line)
(conj line 'debug)
line))
lines))
@Scriptor
Scriptor / gist:2432470
Created April 20, 2012 22:53
Stack lang for anarchy channel
def onMessage(name, message):
funcs = {}
if message[0] != '>':
return None
def do(st):
block = st.pop()
evaluate(block, st)
return st.pop()
@Scriptor
Scriptor / Patch
Created May 7, 2012 22:44
Patches's Patchesness
From 247bab487e38133065575ba4fe5aaa673c63a3ff Mon Sep 17 00:00:00 2001
From: Tamreen Khan <tamreen@chartbeat.com>
Date: Mon, 7 May 2012 18:40:36 -0400
Subject: [PATCH] Add patches.
---
patches | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 patches
Could not find artifact ibdknox:clojure:pom:1.5.0-alpha1 in central (http://repo1.maven.org/maven2)
Could not find artifact ibdknox:clojure:pom:1.5.0-alpha1 in clojars (https://clojars.org/repo/)
Generating a project called tutor based on the 'default' template.