Skip to content

Instantly share code, notes, and snippets.

View dviramontes's full-sized avatar
〰️
failing forward

David Viramontes dviramontes

〰️
failing forward
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[p5.js]" />
<meta charset="utf-8">
<title>JS Bin</title>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.8/processing.min.js"></script>
</head>
<body>
<canvas id="canvas1" width="200" height="200" border="1"></canvas>
@dviramontes
dviramontes / index.html
Last active May 22, 2017 05:24
JS Bin [p5.js] // source http://jsbin.com/qitexamoki
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[p5.js]" />
<meta charset="utf-8">
<title>JS Bin</title>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.8/processing.min.js"></script>
</head>
<body>
<canvas id="canvas1" width="200" height="200" border="1"></canvas>
@dviramontes
dviramontes / res.json
Created July 18, 2016 02:02
contentful management response
[
{
"sys": {
"publishedAt": "2016-06-22T03:52:38.355Z",
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "2efkk6oex1yh"
}
// register these two event listeners
window.player.on("play", function(){ console.log("played")});
window.player.on("pause", function(){ console.log("paused")});
@dviramontes
dviramontes / example-input-range.cljs
Last active November 9, 2015 16:55
input-range-component-state-transition-example
(ns rmfu-ui.profile
(:require
[reagent.core :as reagent :refer [atom]])) ;; <--- special version of the atom here, rerenders componets on change
(defn input-range-component
[state param]
[:div.row
[:p.bullet.col-lg-7
"Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."]
[:p.col-lg-5
(add-watch app-state :watcher
(fn [key atom -old -new]
(print "-- Atom State Changed --")
(print "key " key)
(print "atom" atom)
(print "old" -old)
(print "new" -new)))
<< started Jetty on http://localhost:3000 >>
Starting file watcher (CTRL-C to quit)...
nREPL server started on port 53753 on host 127.0.0.1 - nrepl://127.0.0.1:53753
Adding :require adzerk.boot-cljs-repl to app.cljs.edn...
Adding :require adzerk.boot-reload to app.cljs.edn...
Compiling boot-cljs-app.js...
clojure.lang.ArityException: Wrong number of args (1) passed to: env/default-compiler-env
...
(set-env!
:source-paths #{"src/cljs"}
:resource-paths #{"resources"}
:dependencies '[[adzerk/boot-cljs "0.0-2814-4" :scope "test"]
[adzerk/boot-cljs-repl "0.1.9" :scope "test"]
[adzerk/boot-reload "0.2.4" :scope "test"]
[pandeiro/boot-http "0.6.1" :scope "test"]
[cljsjs/jquery "1.9.0-0"]
[quil "2.2.5"]]) ;; <--- quil dep
echo | curl http://www.filltext.com/\?rows\=10\&fname\=\{firstName\}\&lname\=\{lastName\}\&pretty\=true | json
@dviramontes
dviramontes / jsonParser.js
Last active June 15, 2016 03:40
Ext.decode vs JSON.parse
// 48 instances of Ext.decode
// 23 instances of Ext.encode
// collection size 7
(function() {
console.time('test')
var x = Ext.decode(temp1.responseText);
console.timeEnd('test')
console.log(x)
})()//test: 0.597ms