Skip to content

Instantly share code, notes, and snippets.

View AlexJWayne's full-sized avatar
🌈

Alex Wayne AlexJWayne

🌈
View GitHub Profile
{
"tag": "div",
"attrs": {
"className": "sale sale-tile sale-3325 date-2014-08-08-sale-3325 draft no-pricing",
"data-sale-day": "2014-08-08",
"data-sale-id": 3325,
"draggable": "true"
},
"children": [
{
Mithril = m = new function app(window) {
var type = {}.toString
var parser = /(?:(^|#|\.)([^#\.\[\]]+))|(\[.+?\])/g, attrParser = /\[(.+?)(?:=("|'|)(.*?)\2)?\]/
function m() {
var args = arguments
var hasAttrs = type.call(args[1]) == "[object Object]" && !("tag" in args[1]) && !("subtree" in args[1])
var attrs = hasAttrs ? args[1] : {}
var classAttrName = "class" in attrs ? "class" : "className"
var cell = {tag: "div", attrs: {}}
var fnArr: (()->())[] = []
fnArr.append({ println("a") })
fnArr.append({ println("b") })
fnArr.append({ println("c") })
for fn in fnArr { fn() }
// a
// b
// c
// 375 loops per second
// – Arduino Uno R3 -
// Thanks to FastLED Math library:
// https://github.com/FastLED/FastLED/wiki/High-performance-math
void sinePixels() {
uint8_t timeScale = 20;
long time = millis() * timeScale;
<cfsavecontent variable="input">
<cfinclude template="request.xml">
</cfsavecontent>
function animate() {
// new frame!
ctx.clearRect(0, 0, canvas.width, canvas.height);
// decide if it's time to spawn a new circle
if (shouldSpawnCircle()) {
circles.push(new Circle())
}
// update and draw all circles
function yell(n){
if (n > 0) {
return yell(n-1) + "a";
} else {
return "hiy";
}
}
function test(email, name) {
if (email == "" || name == "") {
alert("Enter mail or name");
}
return false;
if (email.indexOf("@") == -1) {
alert("Bad email");
}
» curl -I http://www.yuzustudios.com/gallery/Food/G0000zhbdZAbEpkQ/C0000TRldtyo7j4w
HTTP/1.1 301 Moved Permanently
Date: Sun, 28 Apr 2013 20:24:31 GMT
Server: Apache
Location: http://yuzu.photoshelter.com/gallery/Food/G0000zhbdZAbEpkQ/C0000TRldtyo7j4w
Vary: Accept-Encoding
Content-Type: text/html
> Counter
function Counter() { [native code] }
> Counter()
TypeError: Illegal constructor
> c = new Counter()
TypeError: Illegal constructor
> Counter(1)