Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View tavisrudd's full-sized avatar

Tavis Rudd tavisrudd

View GitHub Profile
;; ## Changes from cljs.repl.browser
;;
;; * Multiple concurrent browser-REPLs can be safely used
;; * The browser-REPL's HTTP server is now always-on
;; * Each browser-REPL session supports a new top-level "entry" URL that
;; can be used to easily start the REPL in a browser or other JS runtime
;; (i.e. you don't need to have a separate webapp running to initiate the
;; browser-REPL connection)
;; * The entry (and REPL) URLs are available in slots on the browser-REPL's
;; environment, making it trivial to automate browser-REPL sessions
@tavisrudd
tavisrudd / lxc-ubuntu.sh
Created July 22, 2012 07:17 — forked from michaelcontento/lxc-ubuntu.sh
Script to generate LXC containers for EC2
#!/bin/bash
#
# Template script for generating ubuntu container for LXC with the same
# ubuntu relase as the host
#
# This script is based on lxc-debian for EC2 (Daniil Kulchenko <daniil@kulchenko.com>)
# wich itself is based on lxc-debian (Daniel Lezcano <daniel.lezcano@free.fr>)
#
@tavisrudd
tavisrudd / generative.clj
Created July 20, 2012 18:25 — forked from cemerick/generative.clj
"Integrating" clojure.test and test.generative
;; My good-enough glomming together of clojure.test and test.generative
(ns cemerick.generative
(:require [clojure.test.generative.generators :as gens]
[clojure.test.generative :as gen])
(:use clojure.test))
;; Too bad last-report isn't sent an action upon success as well.
;; Perhaps this should just be replaced with a try/catch/rethrow
;; around the body in defspectest
@tavisrudd
tavisrudd / cocoa_keypress_monitor.py
Created July 6, 2012 22:45 — forked from ljos/cocoa_keypress_monitor.py
Showing how to listen to all keypresses in OS X through the Cocoa API using Python and PyObjC
# cocoa_keypress_monitor.py by Bjarte Johansen is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
from AppKit import NSApplication, NSApp
from Foundation import NSObject, NSLog
from Cocoa import NSEvent, NSKeyDownMask
from PyObjCTools import AppHelper
class AppDelegate(NSObject):
def applicationDidFinishLaunching_(self, notification):
mask = NSKeyDownMask
@tavisrudd
tavisrudd / cljdoc.el
Created January 2, 2012 19:47 — forked from tomykaira/cljdoc.el
cljdoc.el --- eldoc mode for clojure
;;; cljdoc.el --- eldoc mode for clojure
;; Copyright (C) 2011 tomykaira
;; Version 0.1.0
;; Keywords: eldoc clojure
;; Author: tomykaira <tomykaira@gmail.com>
;; URL: https://gist.github.com/1386472
;; This file is not part of GNU Emacs.
@tavisrudd
tavisrudd / core.clj
Created October 31, 2011 17:10 — forked from tomykaira/core.clj
save your followers in neo4j
(ns friends-relationship-twitter.core
(:require [borneo.core :as neo]
twitter
[oauth.client :as oauth]))
(def oauth-consumer (oauth/make-consumer "KEY"
"SECRET"
"https://api.twitter.com/oauth/request_token"
"https://api.twitter.com/oauth/access_token"
"https://api.twitter.com/oauth/authorize"
@tavisrudd
tavisrudd / gist:1152679
Created August 17, 2011 21:24 — forked from rlm/gist:746185
curry.clj
(ns sunil.curry)
(defn partial+
"Takes a function f and fewer than the normal arguments to f, and
returns a fn that takes a variable number of additional args. When
called, the returned function calls f with args + additional args.
differs from the core version in that it works on just one argument."
{:added "1.0"}
([f] f)
([f arg1]
#!/bin/bash
$(dirname $0)/bootstrap-portage.sh
# keyword chef and dependencies
cat <<EOF > /etc/portage/package.keywords/chef
=app-admin/chef-0.9.8
=dev-ruby/abstract-1.0.0
=dev-ruby/bunny-0.6.0
=dev-ruby/erubis-2.6.5