This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var reloadSocket = new WebSocket('ws://localhost:35730'); | |
reloadSocket.onmessage = function(msg) { | |
if (msg.data === 'reload') setTimeout(function() { location.reload(); },10) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var React = require('react') | |
var ReactAddons = require('react/addons') | |
var ReactTestUtils = React.addons.TestUtils | |
var reactTestQueryUtil = function (tree) { | |
this.tree = tree | |
} | |
reactTestQueryUtil.prototype.class = function (cls) { | |
this.class = cls | |
return this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var request = require('request') | |
var Docker = require('dockerode') | |
var swarm = Docker({host: 'http://docker.host', port: 4243}) | |
var dnshost = 'http://dns.host:8080' | |
var interval = 2000 | |
var loop = function () { | |
getContainers(function (currContainer) { | |
updateDns(currContainer) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import assign from 'react/lib/Object.assign' | |
import Route from 'route-parser' | |
export default class Router extends React.Component { | |
constructor(props) { | |
super(props) | |
let routes = Object.keys(this.props.routes).map((route) => { | |
return { route : new Route(route), handler : this.props.routes[route] } | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var through = require('through2'); | |
var i = -1 | |
var head = function(type) { i++; return i == 0 ? 'module.exports = "data:image/'+type+';base64,' : '' } | |
var tail = function() { return '"' } | |
var isImg = function(file) { | |
return (/\.((lit)?gif|png|jpg|jpeg)$/).exec(file); | |
} | |
module.exports = function (file) { | |
if (!isImg(file)) return through() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var transformTools = require('browserify-transform-tools') | |
var stylus = require('stylus') | |
module.exports = transformTools.makeStringTransform( | |
"stylusify", | |
{ | |
includeExtensions: [".styl"] | |
}, | |
function (content, opts, done) { | |
stylus(content).render(function(err, css) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import ScopeStyle from 'react-scopestyle' | |
let css = "div { color:pink; }" | |
export default class MyScopeStyleComponent extends React.Component { | |
render() { | |
return ( | |
<ScopeStyle style={css}> | |
<div>yolo</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { InjectStyle } from 'react-scopestyle' | |
import Component from './component' | |
React.render( | |
<div className="app"> | |
<InjectStyle /> | |
<Component /> | |
</div> | |
, document.body) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { FireStarter } from './fireflux' | |
import Component from './component' | |
@FireStarter('https://fireflux.firebaseio.com/') | |
class App extends React.Component { | |
render() { | |
return <Component /> | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kernel: | |
image: "linuxkit/kernel:4.9.x" | |
cmdline: "console=ttyS0 console=tty0 page_poison=1" | |
init: | |
- linuxkit/init:63eed9ca7a09d2ce4c0c5e7238ac005fa44f564b | |
- linuxkit/runc:b0fb122e10dbb7e4e45115177a61a3f8d68c19a9 | |
- linuxkit/containerd:18eaf72f3f4f9a9f29ca1951f66df701f873060b | |
- linuxkit/ca-certificates:5fc6ba7f91534ddbfef975404c33e44581e6ed7a | |
onboot: | |
- name: sysctl |