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 os | |
import sys | |
import traceback | |
from functools import wraps | |
from multiprocessing import Process, Queue | |
def processify(func): | |
'''Decorator to run a function as a process. | |
Be sure that every argument and the return value |
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
// deps | |
"react": "^15.4.2", | |
"react-dom": "^15.4.2", | |
"react-redux": "^5.0.2", | |
"react-router": "next", | |
"react-router-redux": "next", | |
"redux": "^3.6.0", | |
"redux-logger": "^2.8.1" | |
// index.js |
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
/// Route | |
import React from 'react'; | |
import { Router, Route } from 'react-router'; | |
import Profile from './components/Profile'; | |
const Routes = (props) => ( | |
<Router {...props}> | |
<Route path="/profile/:username" component={Profile} /> |
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
async function main () { | |
try { | |
const res = await fetch('https://api.github.com/orgs/facebook'); | |
const json = await res.json(); | |
console.log(json); | |
} catch (e) { | |
// handle error | |
} | |
} |
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
Server listening on :: port 33333. | |
debug3: fd 5 is not O_NONBLOCK | |
debug1: Server will not fork when running in debugging mode. | |
debug3: send_rexec_state: entering fd = 8 config len 760 | |
debug3: ssh_msg_send: type 0 | |
debug3: send_rexec_state: done | |
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8 | |
debug1: inetd sockets after dupping: 3, 3 | |
Connection from 99.254.XXX.XXX port 56834 on 158.69.75.XXX port 33333 | |
debug1: Client protocol version 2.0; client software version Go |
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
$ git push [email protected]:phoenix master | |
Warning: Permanently added the ECDSA host key for IP address '8.8.8.8' to the list of known hosts. | |
+ case "$(lsb_release -si)" in | |
++ lsb_release -si | |
+ export DOKKU_DISTRO=ubuntu | |
+ DOKKU_DISTRO=ubuntu | |
+ export DOKKU_IMAGE=gliderlabs/herokuish | |
+ DOKKU_IMAGE=gliderlabs/herokuish | |
+ export DOKKU_LIB_ROOT=/var/lib/dokku |
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
source "https://supermarket.chef.io" | |
cookbook 'apt', '~> 2.7.0' | |
cookbook 'build-essential', '~> 2.2.3' | |
cookbook 'git', '~> 4.3.3' | |
cookbook 'heroku-toolbelt', '~> 0.1.0' | |
cookbook 'imagemagick', '~> 0.2.3' | |
cookbook 'nginx', '~> 2.7.6' | |
cookbook 'nodejs', '~> 2.4.0' | |
cookbook 'postgresql', '~> 3.4.20' |
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
input { | |
tcp { port => 3333 type => "json" } | |
stdin { | |
type => "stdin-type" | |
} | |
file { | |
type => "syslog" | |
path => [ "/var/log/*.log", "/var/log/messages", "/var/log/syslog" ] |
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
input { | |
tcp { port => 3333 type => "json event" codec => json_lines {} } | |
stdin { | |
type => "stdin-type" | |
} | |
file { | |
type => "syslog" | |
path => [ "/var/log/*.log", "/var/log/messages", "/var/log/syslog" ] |
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
#!/bin/sh | |
# init.d script for basexserver http://basex.org/ | |
# (c) 2012 Andy Bunce <[email protected]>, BSD | |
# (c) 2015 Ashley Connor <[email protected]>, LICENSE AS ABOVE | |
### BEGIN INIT INFO | |
# Provides: basex-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog |