Skip to content

Instantly share code, notes, and snippets.

Avatar

Jesper Louis Andersen jlouis

View GitHub Profile
View sleepsort.bash
#!/bin/bash
# Sleep sort
# http://dis.4chan.org/read/prog/1295544154
function f() {
sleep "$1"
echo "$1"
}
@jlouis
jlouis / iopattern.ksh
Created Apr 27, 2012 — forked from krestenkrab/iopattern.ksh
iopattern - print disk I/O pattern.
View iopattern.ksh
#!/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 $
View gist:830489
%% @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 } ).
View moddeps.erl
-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],