Skip to content

Instantly share code, notes, and snippets.

View rads's full-sized avatar

Radford Smith rads

View GitHub Profile
; before
(defpage "/photos" {}
  (common/main-layout (...)))
(defpage "/photos/:id" {id :id}
  (common/main-layout (...)))
(defpage "/photos/:id/edit" {id :id}
  (common/main-layout (...)))
@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
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)
- (void)loadView
{
[super loadView];
UIView *view = [[UIView alloc] initWithFrame:[[self view] bounds]];
[view setAutoresizesSubviews:YES];
[view setAutoresizingMask:UIViewAutoresizingFlexibleHeight];
[self setView:view];
}
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)
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);
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);
@rads
rads / index.js
Last active December 29, 2015 14:09
CSP.js Issue #1
regenerator index.js > index_compiled.js
(set-env!
:dependencies '[[org.clojure/clojure "1.9.0-alpha15"]
[org.clojure/test.check "0.9.0"]])
(require
'[clojure.spec :as s]
'[clojure.spec.test :as stest])
(s/def ::printer fn?)
@rads
rads / machine.js
Created November 27, 2019 03:26
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'fetch',
// Initial state
initial: 'idle',
// States
states: {
idle: {
on: {