Skip to content

Instantly share code, notes, and snippets.

View refractalize's full-sized avatar

Tim Macfarlane refractalize

View GitHub Profile
@refractalize
refractalize / index.js
Last active August 29, 2015 14:12
requirebin sketch
var plastiq = require('plastiq');
var h = plastiq.html;
var bind = plastiq.bind;
function render(model) {
return h('div',
h('ul',
model.people.map(function (person) {
return h('li', person.name);
})
@refractalize
refractalize / index.js
Last active August 29, 2015 14:12
requirebin sketch
var plastiq = require('plastiq');
var h = plastiq.html;
var bind = plastiq.bind;
function render(model) {
return h('div',
h('label', "what's your name?"),
h('input', {type: 'text', model: bind(model, 'name')}),
h('div', 'hi ' + model.name)
);
@refractalize
refractalize / index.js
Last active August 29, 2015 14:12
requirebin sketch
var plastiq = require('plastiq');
var h = plastiq.html;
var bind = plastiq.bind;
function render(model) {
return h('div',
h('button', {
onclick: function () {
return function (render) {
setInterval(function () {
@refractalize
refractalize / index.js
Last active August 29, 2015 14:12
requirebin sketch
var plastiq = require('plastiq');
var h = plastiq.html;
var bind = plastiq.bind;
function render(model) {
return h('div',
h('label', "what's your name?"), ' ',
h('input', {type: 'text', binding: bind(model, 'name')}),
h('div', 'hi ', model.name)
);
a = integer
b = a + 1
" this is the start of something new {b} = {a} + 1, always
c = object {
x = integer
y = 4
z = x + y
}

Keybase proof

I hereby claim:

  • I am refractalize on github.
  • I am refractalize (https://keybase.io/refractalize) on keybase.
  • I have a public key whose fingerprint is C5D9 BC18 6C87 A1A3 5509 BA55 EE9E 9A1A 75F9 B6CB

To claim this, I am signing this object:

@refractalize
refractalize / docker-rhel-7.md
Last active April 18, 2016 15:27
Running Docker on RHEL 7

RPM repositories

subscription-manager repos --enable=rhel-7-server-extras-rpms
subscription-manager repos --enable=rhel-7-server-optional-rpms

Install

yum install docker

Startup options

@refractalize
refractalize / make-backup
Last active August 29, 2015 14:02
time machine style backups with rsync
#!/bin/sh
source=$1
backups=$2
date=`date -u "+%Y_%m_%dT%H_%M_%S"`
mkdir -p $backups
if [ -e $backups/latest ]
then
@refractalize
refractalize / readme.md
Last active August 29, 2015 13:58
how do I get mocha to support pogo tests?

Place this in the file test/mocha.opts:

-r pogo

@refractalize
refractalize / rethinkdb-pogo-repl.md
Last active August 29, 2015 13:57
Mucking around with rethinkdb and the pogoscript REPL

Mucking around with rethinkdb and the pogoscript REPL:

> r = require 'rethinkdb'
[snip]
> connection = r.connect {}!
[snip]
> r.tableCreate 'bobo'.run (connection)!
{ created: 1 }
> r.table 'bobo'.insert {name = 'haha'}.run (connection)!

{ deleted: 0,