Skip to content

Instantly share code, notes, and snippets.

View MonkeyIsNull's full-sized avatar

Adam Guyot MonkeyIsNull

View GitHub Profile
@MonkeyIsNull
MonkeyIsNull / file_pw_spit.c
Created May 2, 2012 12:27
Linked List file spitter
// Spits out the lines of a file forwards and backwards, via a linked list
// All Hail Zed Shaw and (Re)Learn C the Hard Way
// This Bitch be free of Memory leaks, Yo!
// ==9234==
// ==9234== HEAP SUMMARY:
// ==9234== in use at exit: 8,280 bytes in 3 blocks
// ==9234== total heap usage: 134 allocs, 131 frees, 14,531 bytes allocated
// ==9234==
// ==9234== LEAK SUMMARY:
// ==9234== definitely lost: 0 bytes in 0 blocks
@MonkeyIsNull
MonkeyIsNull / plop.rb
Created March 22, 2012 00:15
Watches for the Plops of Twitter dropping your friends
require 'rubygems'
require 'twitter'
require 'Getopt/Declare'
class Plop
attr_accessor :who, :seed_file, :peep_list
def initialize(who, seed_file='./plop.seed')
@who = who
var _ = require('underscore');
// Example Char for testing
var cel = {
"Upper Strength": 17,
"Lower Strength": 14,
"Structural Stamina": 15,
"Internal Endurance": 19,
"Dexterity": 14,
"Agility": 14,
@MonkeyIsNull
MonkeyIsNull / rsyncwatchd.js
Created January 20, 2012 03:43
An rsync watcher
var fs = require('fs'),
dir = "/tmp/rpki/repository",
tempFile = "/tmp/replace.rsync.conf",
relFile = "/etc/rsyncd.conf",
repo = "[repository]\n\tpath = /tmp/rpki/repository/";
var util = require('util'),
spawn = require('child_process').spawn;
function kick_rsync() {
@MonkeyIsNull
MonkeyIsNull / flow.js
Created January 19, 2012 04:04
Serial Flow
// flow in serial
var queue = [
function (msg) {
console.log(msg);
next("second please...");
},
function (msg) {