Skip to content

Instantly share code, notes, and snippets.

@raiscui
raiscui / Enhance.js
Created December 23, 2015 12:45 — forked from sebmarkbage/Enhance.js
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
#cloud-config
---
users:
- name: core
passwd: $1$8Kxo5IMS$dGqEN0MlLgLELsQ/NpBHp/
coreos-ssh-import-github: raiscui
groups:
- sudo
- docker
coreos:
@raiscui
raiscui / dabblet.css
Created June 6, 2014 04:29
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: transparent;
/*background: linear-gradient(45deg, #f06, yellow);*/
@raiscui
raiscui / dabblet.css
Created June 6, 2014 04:06
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f0f0f2;
/*background: linear-gradient(45deg, #f06, yellow);*/
min-height: 100%;
@raiscui
raiscui / dabblet.css
Created June 6, 2014 04:06
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f0f0f2;
/*background: linear-gradient(45deg, #f06, yellow);*/
min-height: 100%;
@raiscui
raiscui / dabblet.css
Created June 6, 2014 04:05
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f0f0f2;
/*background: linear-gradient(45deg, #f06, yellow);*/
min-height: 100%;
var mongoose = require('mongoose');
mongoose.connect('mongo://localhost/test');
var conn = mongoose.connection;
var users = conn.collection('users');
var channels = conn.collection('channels');
var articles = conn.collection('articles');
var insertUsers = Q.nfbind(users.insert.bind(users));
var insertChannels = Q.nfbind(channels.insert.bind(channels));