Skip to content

Instantly share code, notes, and snippets.

View jlouis's full-sized avatar

Jesper Louis Andersen jlouis

View GitHub Profile
@jlouis
jlouis / sleepsort.bash
Created May 23, 2017 22:19 — forked from timendum/sleepsort.bash
Sleep sort!
#!/bin/bash
# Sleep sort
# http://dis.4chan.org/read/prog/1295544154
function f() {
sleep "$1"
echo "$1"
}
@jlouis
jlouis / iopattern.ksh
Created April 27, 2012 14:30 — forked from krestenkrab/iopattern.ksh
iopattern - print disk I/O pattern.
#!/usr/bin/ksh
#
# iopattern - print disk I/O pattern.
# Written using DTrace (Solaris 10 3/05).
#
# This prints details on the I/O access pattern for the disks, such as
# percentage of events that were of a random or sequential nature.
# By default totals for all disks are printed.
#
# $Id: iopattern 65 2007-10-04 11:09:40Z brendan $
@jlouis
jlouis / gist:830489
Created February 16, 2011 23:05 — forked from jeena/gist:830405
%% @doc This module represents a Player with a Socket and a Token
-module(ggs_table).
-behaviour(gen_server).
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-record(state, { token, players, socket, game_vm } ).
-module(moddeps).
-compile(export_all).
write_to(Filename) ->
xref:start(s),
xref:add_directory(s, "ebin"),
{ok, Calls} = xref:q(s, "XC"),
Mods = [{From, To} || {{From,_,_}, {To,_,_}} <- Calls],