Skip to content

Instantly share code, notes, and snippets.

View marvinpinto's full-sized avatar

Marvin Pinto marvinpinto

View GitHub Profile
@ThisIsMissEm
ThisIsMissEm / handler.js
Created November 25, 2014 18:53
The better way to execute Go on Amazon Lambda (see: http://blog.0x82.com/2014/11/24/aws-lambda-functions-in-go/)
var child_process = require('child_process');
exports.handler = function(event, context) {
var proc = spawn('./test', [ JSON.stringify(event) ], { stdio: 'inherit' });
proc.on('close', function(code){
if(code !== 0) {
return context.done(new Error("Process exited with non-zero status code"));
}
@icgood
icgood / proxy-chromium.sh
Last active March 7, 2023 21:59
Creates a separate, incognito Chrome/Chromium browser instance, proxied through the given SSH host to maximize privacy.
#!/bin/bash
APPLICATION="chromium"
which google-chrome
if [ $? -eq 0 ]; then
APPLICATION="google-chrome"
fi
HOST="$1"
if [ "x$HOST" = x ]; then