Skip to content

Instantly share code, notes, and snippets.

View schrodervictor's full-sized avatar
🖖
Live long and prosper.

Victor Schröder schrodervictor

🖖
Live long and prosper.
View GitHub Profile
@schrodervictor
schrodervictor / node_debian_init.sh
Last active September 6, 2015 16:02 — forked from peterhost/node_debian_init.sh
Daemon init script for node.js based app/server (DEBIAN/UBUNTU)
#!/bin/sh
# ------------------------------------------------------------------------------
# SOME INFOS : fairly standard (debian) init script.
# Note that node doesn't create a PID file (hence --make-pidfile)
# has to be run in the background (hence --background)
# and NOT as root (hence --chuid)
#
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts
# INSTALL/REMOVE http://www.debian-administration.org/articles/28
@schrodervictor
schrodervictor / vagrant.py
Last active August 29, 2015 14:22 — forked from lorin/vagrant.py
#!/usr/bin/env python
# Adapted from Mark Mandel's implementation
# https://github.com/ansible/ansible/blob/devel/plugins/inventory/vagrant.py
import argparse
import json
import paramiko
import subprocess
import sys

PHPUnit API reference

  • version 3.6

TODO

Check those constraints:

$this->anything()
var runner = require('child_process');
runner.exec(
'php -r \'include("settings.php"); print json_encode($databases);\'',
function (err, stdout, stderr) {
var connection = JSON.parse(stdout).default.default;
console.log(connection.database);
// result botdb
}