Skip to content

Instantly share code, notes, and snippets.

View MattVonVielen's full-sized avatar

Matt Campbell MattVonVielen

View GitHub Profile
@tbielawa
tbielawa / linux-compile-run-request-code.sh
Last active March 14, 2016 20:34
Reading block device sizes in python - More in the blog post: https://blog.lnx.cx/?p=678
$ gcc ./linux-request-code.c
$ ./a.out
Block count request code: 0x80081272
@lukego
lukego / gist:3952159
Created October 25, 2012 11:46
Erlang literate programming
Simple literate programming.
Add comments to your Erlang file with a special %%% syntax, like this:
%%% This is a comment that will be formatted in a variable width font with Markdown.
%%% You can use *emphasis* and
%%% # Headings
%%% and even
%%%
%%% - Lists
@uwiger
uwiger / gist:2365439
Created April 12, 2012 07:29
make_node: escript for creating a node-local start directory
#!/usr/bin/env escript
%% -*- erlang -*-
%% Copyright 2011-12 Feuerlabs Inc.
%% License: "BSD New" (http://www.opensource.org/licenses/BSD-3-Clause)
%% Author: Ulf Wiger <ulf@feuerlabs.com>
-mode(compile).
-record(state, {target, rel, vm_args = []}).