Skip to content

Instantly share code, notes, and snippets.

View mattstyles's full-sized avatar

Matt Styles mattstyles

View GitHub Profile
@mattstyles
mattstyles / gist:fc873727e1d29ec3d8b0
Last active December 7, 2015 17:05
koa-socket with acknowledgement
// socket.js#30
on( event, handler ) {
this.socket.on( event, ( data, fn ) => {
let packet = {
event: event,
data: data,
socket: this,
fn: typeof data === 'object' && data.fn ? data.fn : fn
}
{
"apps": [
{
"script": "server.js",
"next_gen_js": true,
"autorestart": false,
"env": {
"DEBUG":""
}
import http from 'http'
http
.createServer( ( req, res ) => {
res.writeHead( 200, { 'content-type': 'text/plain' } )
res.end( 'Hello http\n' )
console.log( 'GET /' )
})
```
ho-conformance -o output.log < styles.less | ho-compile > output.css
```
Streams log output from conformance test to output.log, pipes styles.less through ho-conformance to ho-compile
```
ho-conformance -o output.log --compile < styles.less > output.css
```