Skip to content

Instantly share code, notes, and snippets.

View jmercouris's full-sized avatar
🌴

John Mercouris jmercouris

🌴
View GitHub Profile
@joshwentz
joshwentz / fork-sync.js
Last active April 4, 2024 03:26
Synchronous Fork in Node.js (with async.series): wait for child_process.fork to finish, then execute part2
var fs = require('fs');
var fork = require('child_process').fork;
var async = require('async');
async.series([
function(callback){
var command = fork("./command.js", [], {silent: true });
command.stdout.pipe(process.stdout);
command.stderr.pipe(process.stderr);
@bellbind
bellbind / getscreenshot.c
Created July 1, 2009 13:33
[c][gtk][webkit]get screenshot PNG from web page
/*
* get screenshot PNG from web page
*
* build:
* FLAGS=`pkg-config --cflags --libs gtk+-x11-2.0 glib-2.0 webkit-1.0`
* gcc -Wall $FLAGS getscreenshot.c -o getscreenshot
*
* usage:
* /usr/bin/xvfb-run -s "-screen 0 1024x768x24" ./getscreenshot test.html
*