Skip to content

Instantly share code, notes, and snippets.

View jperras's full-sized avatar
💨
what what is this where am I

Joël Perras jperras

💨
what what is this where am I
View GitHub Profile
@cczona
cczona / zerovm-talks
Last active August 29, 2015 14:04
videos of talks about ZeroVM
[ZeroVM talk proposals to OpenStack Summit Paris 2014](https://www.openstack.org/vote-paris/SearchForm?Search=ZeroVM)
[2014-08-05] "ZeroVM Architecture and ZVM Runtime (ZRT)" by Ryan McKinney at University of Texas San Antonio Cloud & Big Data Laboratory
[slides (work in progress)](http://www.slideshare.net/sgt_mac/zero-vm-architecture)
[2014-08-01] "Changing the world with ZeroVM and Swift" Jakub Krajcovic at PyConAU OpenStack Miniconf
@fritzy
fritzy / create_documentstore.sql
Last active August 29, 2015 14:05
Using Posgres as an Indexed Document Store
CREATE TABLE document_store (key CHAR(100) PRIMARY KEY, bucket CHAR(100), value JSON);
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <assert.h>
#include "hiredis.h"
#include "async.h"
#include "adapters/libev.h"
void message(redisAsyncContext *c, redisReply *reply, void *privdata) {
# This all assumes you have the process running in
# a terminal screen and you're on Linux-like system.
# First off, suspend the process and background it
ctrl-z # suspend the process
bg # restart/continue the process in the background
# Now create files to log to. They can be called anything,
# Personally I would end the in .log. E.g. could be
# /var/logs/myprocess-stdout.log,
@rcrowley
rcrowley / cron
Created June 14, 2011 19:33
Puppet installation notes
PATH="$PATH:/var/lib/gems/1.8/bin"
*/30 * * * * root puppet agent --no-daemonize --onetime --splay
@kennethreitz
kennethreitz / phantom-jasmine-xunit.js
Created June 17, 2011 23:33 — forked from tmpvar/phantom-jasmine-xunit.js
xunit output from jasmine tests
if (phantom.state.length === 0) {
if (phantom.args.length !== 1) {
console.log('Usage: run-jasmine.js URL');
phantom.exit();
} else {
phantom.state = 'run-jasmine';
phantom.open(phantom.args[0]);
}
} else {
window.setInterval(function () {
@jperras
jperras / pre-commit
Created November 17, 2011 04:00 — forked from spulec/pre-commit
Yipit Pre-commit Hook
#!/usr/bin/env python
import os
import re
import subprocess
import sys
modified = re.compile('^(?:M|A)(\s+)(?P<name>.*)')
CHECKS = [
@markstory
markstory / gist:1770613
Created February 8, 2012 15:55
jenkins json url for getting people who broke the build.
http://jenkins/view/Radiator/api/json?tree=jobs[name,color,buildable,healthReport[description,score,iconUrl],builds[culprits[fullName],changeSet[items[msg]]]]
#!/bin/sh
export PATH=/bin:/usr/bin:/sbin:/usr/sbin
usage=$(
cat <<EOF
$0 [OPTIONS] start/stop
-s set speed default 256Kbit/s
-p set port default 3000
-d set delay default 350ms
@adewes
adewes / redis_lock.py
Last active December 20, 2015 08:49
A Redis-based distributed lock class, based on the solution proposed by Chris Lamb (https://chris-lamb.co.uk/posts/distributing-locking-python-and-redis).
import redis
import time
class LockTimeout(BaseException):
pass
class Lock(object):
"""
Implements a distributed lock using Redis.