Assume we have the following project structures
Project name. This could be anything. for example sample
//First make placeholders for results as globals | |
results = {} | |
processes = {} | |
//Now Spawn Processes within code you need, where index is an identifier | |
spawn_list[index] = spawn(/*file here*/) | |
processes[index] = spawn_list[index].pid | |
results[processes[index]] = {} | |
results[processes[index]]['index'] = index //funny looking but important | |
results[processes[index]]['stdout'] = "" |
function reopenTransportOnHupSignal(fileTransport) { | |
process.on('SIGHUP', function() { | |
var fullname = path.join(fileTransport.dirname, fileTransport._getFile(false)); | |
function reopen() { | |
if (fileTransport._stream) { | |
fileTransport._stream.end(); | |
fileTransport._stream.destroySoon(); | |
} |
// | |
// ImageCaptureManager.swift | |
// ImageCapture | |
// | |
// Created by Jeroen Wesbeek on 29/07/16. | |
// Copyright © 2016 Jeroen Wesbeek. All rights reserved. | |
// | |
import Foundation | |
import AVFoundation |
###The Issue With Forever Forever is great for running node services, with a minor setback: the word "forever" doesn't apply to system reboots.
###The solution, run node apps as a system service logged in as root
vim /etc/init/node-app.conf
Contents for node-app.conf
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
import "js/web.jsx"; | |
class Util { | |
static function image2Canvas(image : HTMLImageElement) : HTMLCanvasElement { | |
var document = dom.window.document; | |
var canvas = document.createElement("canvas") as HTMLCanvasElement; | |
canvas.width = image.width; | |
canvas.height = image.height; | |
var ctx = canvas.getContext("2d") as CanvasRenderingContext2D; | |
ctx.drawImage(image, 0, 0); |
#!/bin/bash | |
# | |
# PostgreSQL Backup Script Ver 1.0 | |
# http://autopgsqlbackup.frozenpc.net | |
# Copyright (c) 2005 Aaron Axelsen <axelseaa@amadmax.com> | |
# | |
# This script is based of the AutoMySQLBackup Script Ver 2.2 | |
# It can be found at http://sourceforge.net/projects/automysqlbackup/ | |
# | |
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9 |
Author: Josef Jezek
# Install Inkscape on Ubuntu
sudo apt-get install inkscape
dbfpy
: http://sourceforge.net/projects/dbfpy/files/latest/download?source=filessudo python setup.py install
To convert DBF file to CSV:
./dbf2csv database.dbf