make sure to clone this gist!
then npm install
it
then run node example.js
if it doesn't work ping me on twitter (@isntitvacant) or irc (chrisdickinson in #pdxnode on freenode.net)
[oh@Alice][~]% curl 'http://aur.archlinux.org/rpc.php?type=info&arg=cower-git' 2>/dev/null | |
{"type":"info","results":{"ID":"35888","Name":"cower-git","Version":"20110323-1","CategoryID":"16","Description":"A simple AUR agent with a pretentious name","URL":"http:\/\/github.com\/falconindy\/cower","URLPath":"\/packages\/cower-git\/cower-git.tar.gz","License":"MIT","NumVotes":"22","OutOfDate":"0"}} | |
[oh@Alice][~]% curl 'http://aur.archlinux.org/rpc.php?type=info&arg=cower-git' 2>/dev/null | json_reformat | |
{ | |
"type": "info", | |
"results": { | |
"ID": "35888", | |
"Name": "cower-git", | |
"Version": "20110323-1", |
#include <AFMotor.h> | |
const float rpm = 6.999999; | |
const int stepsPerRevolution = 200; | |
const int shieldPort = 1; | |
AF_Stepper motor(stepsPerRevolution, shieldPort); | |
void setup() { | |
// set up Serial library at 9600 bps | |
Serial.begin(9600); |
import React, { Component, PropTypes } from 'react'; | |
import htr from 'hooks-theme-refs'; | |
export class Chip extends Component { | |
render() { | |
const { label, hooks, theme, refs, children, ...rest } = htr(this); | |
return ( | |
<div {...rest} className={theme.chip} onClick={hooks.onClick} ref={refs.chip}> | |
{children} |
I have been watching the current discussions about running a virtual DOM in a web worker with a great deal of interest. In 2011, I built a research project, [Treehouse][] ([USENIX Talk][] ([DOMTRIS][] demo at 20:25), [paper][]), which ran a hacked-up version of jsdom in a worker. My goal was fine-grained containment of untrusted scripts, while still providing access to browser APIs that existing code expected.
Treehouse achieved a small amount of influence in academic circles, but it had problems and was ultimately unsuccessful. Virtual DOMs were not a widespread or well-understood idea at the time, so the advantages of running one in a worker
/* | |
* Copyright (c) 2010 Tobias Schneider | |
* This script is freely distributable under the terms of the MIT license. | |
*/ | |
(function(){ | |
var UPC_SET = { | |
"3211": '0', | |
"2221": '1', | |
"2122": '2', |
Please star ⭐️ the gist to help! This is a proposal for a ⚡️ talk at Reactive Conference.
I wrote react-toolbox and presented it almost a year ago in lighning talk at Reactive Conf 2015 in Bratislava. At first it was just a proof of concept of a component library styled with CSS Modules and SASS. Now the project has grown quite a bit, and during this year there has been tons of changes and lessons learned.
Theming and customization is one of the most difficult and interesting problems to solve. For the first version we needed a custom Webpack loader to generate themes and doing simple style overrides was very painful. Today I'm working on a new playground that will allow you try CSS Modules live, and to create React Toolbox themes on the f
//run in node to do the build | |
var requirejs = require('requirejs'), | |
fs = require('fs'), | |
depsRegExp = /\/\*DEPENDENCIES\*\//, | |
globalMapRegExp = /\/\*GLOBALMAP\*\//, | |
shimmer = fs.readFileSync('shimmer.js', 'utf8'), | |
wrapStart = fs.readFileSync('wrap.start', 'utf8'); | |
// You could generate these with code if you want a dynamic build script |
// Basic Usage: | |
// | |
// var main = new Canvas({ elem: "canvas" }, function(options) { | |
// // Instantiate anything specific here... | |
// // Main draw loop | |
// this.draw = function() { | |
// | |
// }; | |
// }); | |
// |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: