This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heroku plugins:install http://github.com/pedro/heroku-mongo-sync.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* js-model JavaScript library, version 0.10.1 | |
* (c) 2010-2011 Ben Pickles | |
* | |
* Released under MIT license. | |
*/ | |
var Model = function(name, func) { | |
// The model constructor. | |
var model = function(attributes) { | |
this.attributes = this.setAttributeValues(Model.Utils.extend({}, attributes)) | |
this.changes = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<title></title> | |
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script> | |
<script type="text/javascript" src="js/mustache.js"></script> | |
</head> | |
<body> | |
<div id="formWrapper"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ .lein cat .profiles | |
{:user | |
{:dependencies {clj-stacktrace "0.2.4"} | |
:injections [(let [orig (ns-resolve (doto 'clojure.stacktrace require) | |
'print-cause-trace) | |
new (ns-resolve (doto 'clj-stacktrace.repl require) | |
'pst)] | |
(alter-var-root orig (constantly @new)))] | |
:plugins [[lein-midje "2.0.0-SNAPSHOT"] | |
[lein-pprint "1.1.1"]]}}% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<technomancy> ebaxt: the problem is that the http connector for aether (called a wagon for whatever reason) isn't found | |
[01:12:02] jodaro ([email protected]) left IRC. (Ping timeout: 246 seconds) | |
[01:12:14] <technomancy> ebaxt: usually you see this when you're trying to deploy to some nonstandard repository type like S3 | |
[01:12:21] ToBeReplaced ([email protected]) left the channel. | |
[01:12:21] <aperiodic> dakrone: it seems to me that the proxy functionality doesn't work with SOCKS (i've got a local SOCKS tunnel open that my web browser is using fine, but i get the same no response exception w/clj-http) | |
[01:12:33] <technomancy> the fact that aether would be unable to find a wagon that it bundles with itself is bizarre |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def fibs | |
(concat (lazy-seq [0 1]) (lazy-seq (map + fibs (rest fibs))))) | |
;fibs: 0 1 1 2 3 5 8... | |
;rest: n 0 1 1 2 3 5 | |
;res: 0 1 2 3 5 8 | |
; A | |
;[0 1 | |
; (map + [0 1] [1]) => [0 1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn pipe | |
"Returns a vector containing a sequence that will read from the | |
queue, and a function that inserts items into the queue. | |
Source: http://clj-me.cgrand.net/2010/04/02/pipe-dreams-are-not-necessarily-made-of-promises/" | |
[] | |
(let [q (LinkedBlockingQueue.) | |
EOQ (Object.) | |
NIL (Object.) | |
s (fn queue-seq [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let [[message-seq put] (pipe)] | |
(letfn [(message-handler [ch msg-meta payload] | |
(put {:ch ch :msg-meta msg-meta :payload payload}))] | |
(lc/subscribe ch qname message-handler :auto-ack true)) | |
message-seq) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn with-test-auth | |
([] (with-test-auth {})) | |
([credentials] | |
(fn [f] | |
(with-redefs-fn | |
{#'cemerick.friend/current-authentication | |
(fn [] (merge {:identity "test", | |
:username "test", | |
:email "[email protected]"} credentials))} | |
f)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ brew install nginx | |
$ cd /user/local/var/www | |
$ ln -s /Users/ebaxt/Projects/ardoq-front/src/css | |
$ ln -s /Users/ebaxt/Projects/ardoq-front/src/js | |
$ ln -s /Users/ebaxt/Projects/ardoq-front/src/less | |
$ ln -s /Users/ebaxt/Projects/ardoq-front/resources/public/img img | |
$ ln -s /Users/ebaxt/Projects/ardoq-front/src/html/* ./ | |
$ pwd | |
/usr/local/var/www |
OlderNewer