Skip to content

Instantly share code, notes, and snippets.

View ketralnis's full-sized avatar

david king ketralnis

View GitHub Profile
-- save a pointer to globals that would be unreachable in sandbox
local e=_ENV
function make_sandbox()
-- sample sandbox environment
sandbox_env = {
ipairs = ipairs,
next = next,
pairs = pairs,
pcall = pcall,
#!/usr/bin/env python2.7
try:
import simplejson as json
except ImportError:
import json
import tempfile
import sqlite3
import subprocess
@ketralnis
ketralnis / multiproc.py
Created February 10, 2017 21:50
multiproc.py
#!/usr/bin/env python
import os
import sys
import signal
import logging
def multijob(jobs):
pids = {}