Skip to content

Instantly share code, notes, and snippets.

View marsam's full-sized avatar
🇵🇸
From the river to the sea, Palestine will be free 🇵🇸

Mario Rodas marsam

🇵🇸
From the river to the sea, Palestine will be free 🇵🇸
View GitHub Profile
@marsam
marsam / RABBIT.scm
Created December 30, 2015 23:21 — forked from darius/RABBIT.scm
[code] Rabbit compiler commented
;;- -*-scheme-*-
;;; rabbit compiler
;;- This is the source code to the RABBIT Scheme compiler, by Guy Steele,
;;- taken from the Indiana Scheme repository and annotated by me, Darius
;;- Bacon. I converted it from all-uppercase to all-lowercase and
;;- reindented it with Emacs for better readability. I've added the
;;- comments starting with either ;- or ;*. Other comments are by Steele.
;;- The ;- comments were things I'd figured out, while ;* denoted things
;;- for me to look into. (Sometimes I didn't bother to type in the answer
@marsam
marsam / springer-free-maths-books.md
Created December 29, 2015 13:51 — forked from bishboria/springer-free-maths-books.md
[docs] Springer have made a bunch of books available for free, here are the direct links
@marsam
marsam / snowden-ietf93.md
Last active October 15, 2016 17:29 — forked from mnot/snowden-ietf93.md
[docs] Transcript of Edward Snowden's comments at IETF93.
#!/bin/bash
# load resources
xrdb -merge .Xresources
#xsetroot -solid '#222'&
# map caps lock as extra escape
xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'&
# start clipboard manager
parcellite&
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |c|
c.vm.box = "thoughtpolice/nixos-13.10"
c.vm.provider "virtualbox" do |vb|
vb.gui = false; vb.memory = 4096; vb.cpus = 2
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous and myself. Never let these guys
// change jobs! :)
#define struct union
@marsam
marsam / pr.md
Created August 14, 2012 02:47 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@marsam
marsam / magic_memit.py
Created June 30, 2012 19:55 — forked from vene/magic_memit.py
memit: magic memory usage benching for IPython
# Author: Vlad Niculae <vlad@vene.ro>
# Makes use of memory_profiler from Fabian Pedregosa
# available at https://github.com/fabianp/memory_profiler
from IPython.core.magic import Magics, line_magic, magics_class
@magics_class
class MemMagics(Magics):
@line_magic
@marsam
marsam / timer.py
Created June 30, 2012 13:15 — forked from cgoldberg/timer.py
Python Timer Class - Context Manager for Timing Code Blocks
#!/usr/bin/env python
#
# Python Timer Class - Context Manager for Timing Code Blocks
# Corey Goldberg - 2012
#
from timeit import default_timer