Skip to content

Instantly share code, notes, and snippets.

View rads's full-sized avatar

Radford Smith rads

View GitHub Profile
@rads
rads / index.js
Last active December 29, 2015 14:09
CSP.js Issue #1
regenerator index.js > index_compiled.js
var fromArray = require('read-stream/array'),
CombinedStream = require('combined-stream');
var s1 = fromArray([1, 2, 3]);
var s2 = fromArray([4, 5, 6]);
var combined = CombinedStream.create();
combined.on('data', function(v) {
console.log(v);
function runner(machine) {
var gen = machine();
runner_(gen, gen.next());
}
function runner_(gen) {
var delay = Math.random() * 1000;
setTimeout(function() {
gen.next(delay);
runner_(gen);
Tue Apr 30 2013 22:43:29 GMT-0700 (PDT)
Testing tunes.test.core
Testing tunes.test.player
Ran 3 tests containing 4 assertions.
0 failures, 0 errors.
FAIL in () (:)
expected: (> (clojure.core/deref position) 0)
- (void)loadView
{
[super loadView];
UIView *view = [[UIView alloc] initWithFrame:[[self view] bounds]];
[view setAutoresizesSubviews:YES];
[view setAutoresizingMask:UIViewAutoresizingFlexibleHeight];
[self setView:view];
}
diff --git src/cljs/cljs/core.cljs src/cljs/cljs/core.cljs
index 4f7bd94..6c011da 100644
--- src/cljs/cljs/core.cljs
+++ src/cljs/cljs/core.cljs
@@ -3439,9 +3439,9 @@ reduces them without incurring seq initialization"
(seq? x) (doall (map thisfn x))
(coll? x) (into (empty x) (map thisfn x))
(goog.isArray x) (vec (map thisfn x))
- (goog.isObject x) (into {} (for [k (js-keys x)]
- [(keyfn k)
@rads
rads / .gitignore
Created April 1, 2012 22:40
lein-cljsbuild 0.1.5 bug
/target
/lib
/classes
/checkouts
pom.xml
*.jar
*.class
.lein-deps-sum
.lein-failures
.lein-plugins
; before
(defpage "/photos" {}
  (common/main-layout (...)))
(defpage "/photos/:id" {id :id}
  (common/main-layout (...)))
(defpage "/photos/:id/edit" {id :id}
  (common/main-layout (...)))
javascript:(function(){readConvertLinksToFootnotes=true;readStyle='style-athelas';readSize='size-medium';readMargin='margin-wide';_readability_script=document.createElement('SCRIPT');_readability_script.type='text/javascript';_readability_script.src='http://lab.arc90.com/experiments/readability/js/readability.js?x='+(Math.random());document.getElementsByTagName('head')[0].appendChild(_readability_script);_readability_css=document.createElement('LINK');_readability_css.rel='stylesheet';_readability_css.href='http://lab.arc90.com/experiments/readability/css/readability.css';_readability_css.type='text/css';_readability_css.media='all';document.getElementsByTagName('head')[0].appendChild(_readability_css);_readability_print_css=document.createElement('LINK');_readability_print_css.rel='stylesheet';_readability_print_css.href='http://lab.arc90.com/experiments/readability/css/readability-print.css';_readability_print_css.media='print';_readability_print_css.type='text/css';document.getElementsByTagName('head')[0].
(defunk fetch
"Fetches objects from a collection.
Note that MongoDB always adds the _id and _ns
fields to objects returned from the database.
Optional arguments include
:where -> takes a query map
:only -> takes an array of keys to retrieve
:as -> what to return, defaults to :clojure, can also be :json or :mongo
:from -> argument type, same options as above
:skip -> number of records to skip