This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// flow in serial | |
var queue = [ | |
function (msg) { | |
console.log(msg); | |
next("second please..."); | |
}, | |
function (msg) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% str(ulf, 19). | |
% intell(ulf, 12). | |
% dex(ulf, 10). | |
%str(gar, 12). | |
%intell(gar, 18). | |
%dex(gar, 13). | |
% calc_stats(X,N):- | |
% str(X,Y), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Here's our set of users | |
% Mind you, fred has no access_levels, he's a user | |
% but he can't even logon | |
user(jon). | |
user(mary). | |
user(ed). | |
user(fred). | |
% access_level(rankNumber, name, create, read, modify) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"time" | |
"math/rand" | |
"fmt" | |
"strconv" | |
) | |
func randInt(min int, max int) int { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"time" | |
"fmt" | |
"io" | |
"net/http" | |
"os" | |
"strings" | |
"github.com/PuerkitoBio/goquery" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Monkey problem in Prolog -- Taken from PPAI | |
% Before reading this code: http://www.youtube.com/watch?v=WnlIWpZSPXU | |
% | |
% First up is the move to the final spot we want | |
move(state(middle, onbox, middle, hasnot), %Before | |
grasp, %Action | |
state(middle, onbox, middle, has)). %After -- monkey wins motherfucker! | |
% Action climb |
OlderNewer