What if we wanted to use backbone-style event delegation within the component paradigm afforded by react/preact/etc? Would that be useful?
Basic usage:
Day 1 | |
Julian Cheal | |
Dancing with Robots | |
? | |
Tero Parviainen | |
Build Your Own AngularJS | |
? |
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- Object Format Tests --> | |
<script src='tiles.js'></script> | |
<!-- Binary Format Tests --> | |
<!--<script src='tiles-binary.js'></script>--> | |
</head> | |
<body> | |
</body> |
arch=i386 | |
uname -m |grep 64 && arch=amd64 | |
[ -d /usr/local/bin/ ] || mkdir -p /usr/local/bin/ | |
wget -O /usr/local/bin/wkhtmltopdf.tar.bz2 http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-${arch}.tar.bz2 | |
cd /usr/local/bin/ | |
tar jxvf /usr/local/bin/wkhtmltopdf.tar.bz2 | |
mv wkhtmltopdf-${arch} wkhtmltopdf | |
chmod 755 wkhtmltopdf | |
cd - | |
wkhtmltopdf --help && echo "You're welcome Carl" |
/// <summary> | |
/// - Make sure you have a Grid GameObject (any GameObject with a Grid component attached to it) in the scene. | |
/// - Attach this script to the GameObject you wanna snap to the Grid. Then drag and drop the Grid | |
/// GameObject into the AttachedGrid field to create a reference to the Grid component attached to it. | |
/// - Enter Play Mode, and then every time you hit the Space key, this GameObject will move 1 unit | |
/// down along the Y axis, while remaining snapped to the Grid. | |
/// </summary> | |
using System.Collections; | |
using System.Collections.Generic; |
<?php | |
////////////////////////////////// | |
// Reddit "hot" story algorithm // | |
////////////////////////////////// | |
function hot($ups, $downs, $date) | |
{ | |
if (is_string($date)) $date = strtotime($date); | |
$s = $ups - $downs; |
/* @flow */ | |
type Result<T> = { | |
result: boolean, | |
payload: T | |
} | |
type Conditional<T> = { | |
type: 'conditional', | |
exec(T): Result<T> |
/** Async version of Array.prototype.reduce() | |
* await reduce(['/foo', '/bar', '/baz'], async (acc, v) => { | |
* acc[v] = await (await fetch(v)).json(); | |
* return acc; | |
* }, {}); | |
*/ | |
export async function reduce(arr, fn, val, pure) { | |
for (let i=0; i<arr.length; i++) { | |
let v = await fn(val, arr[i], i, arr); | |
if (pure!==false) val = v; |
/*! | |
* jQuery Tiny Pub/Sub - v0.X - 11/18/2010 | |
* http://benalman.com/ | |
* | |
* Original Copyright (c) 2010 "Cowboy" Ben Alman | |
* Dual licensed under the MIT and GPL licenses. | |
* http://benalman.com/about/license/ | |
* | |
* Made awesome by Rick Waldron | |
* |