Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
import os
import subprocess
import datetime
class Commit:
@classmethod
def parse(cls, hash, repository):
return Commit(repository, hash)
@camillobruni
camillobruni / ptrace-exmaple.c
Last active September 25, 2018 08:47
A little example showing how ptrace works under OSX
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/ptrace.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
int target_pid;
long ret;
# save history of commands you type
set history save on
# set intel assembly style
set disassembly-flavor intel
define openwindows
# change layout to show interesting info
layout asm
layout regs
@camillobruni
camillobruni / wiki readifier
Created February 1, 2011 13:18
Makes wikipedia pages more readable
javascript:(function(){width=32;$.getScript('http://hyphenator.googlecode.com/svn/tags/Version%203.2.0/Hyphenator.js?bm=true');$('#toc').css('position','fixed').css('top','0').css('right','0').toggle(function(){$('#toc ul').show()},function(){$('#toc ul').hide()});$('#toc ul').hide();$('body').css('font-size','19px').css('text-align','justify').css('font-family','Tex Gyre Termes, Times New Roman, Georgia');/* center the infobox */$('.infobox').css('float','none') .css('margin-left','auto') .css('margin-right','auto');/* center images */$('.tright').css('float','none');$('.thumbinner').css('margin-left','auto').css('margin-right','auto');$('#bodyContent').css('left','50%').css('width',width+'em').css('marginLeft','-'+(width/2)+'em');})()