Skip to content

Instantly share code, notes, and snippets.

View mathew-hall's full-sized avatar

Mathew Hall mathew-hall

View GitHub Profile
@bergeycm
bergeycm / plot-kitty.R
Created August 29, 2014 17:29
R function to grab a random picture of a cat and a random quote from Dune and plot them together.
plot.kitty = function () {
library(jpeg)
temp.cat = tempfile()
download.file("http://thecatapi.com/api/images/get?format=src&type=jpg",
destfile=temp.cat)
kitty = readJPEG(temp.cat)
@dill
dill / fw2dot.R
Created January 27, 2014 20:48
Build a GraphViz compatible file showing which functions call each other in an R package.
# use MVB's foodweb to build a graphviz-compatible "dot" file
# this can then be used to generate a svg of the graph using:
# $ dot -Tsvg file.dot -o file.svg
# example usage:
# fw2dot("mrds","mrds.dot")
library(mvbutils)
fw2dot <- function(package.name,filename){
@0xabad1dea
0xabad1dea / ABI
Created April 5, 2012 19:50
0x10c Programming Notes
On April 5 2012, #0x10c-dev agreed to the following standard ABI:
- Registers A, B, C are clobberable across calls
- Registers I, J, X, Y, Z are preserved across calls
- Return in A
- J is used for base stack pointer (preserving the value of SP before allocating
data for locals)