Skip to content

Instantly share code, notes, and snippets.

View alexrinass's full-sized avatar

Alexander Rinass alexrinass

View GitHub Profile
@wolfeidau
wolfeidau / arg.d
Created October 16, 2012 12:06
DTrace to snoop out processes executed on an OSX system and display their command line
#!/usr/sbin/dtrace -C -s
#pragma D option quiet
proc::posix_spawn:exec-success,proc::__mac_execve:exec-success
{
this->isx64=(curproc->p_flag & P_LP64)!=0;
#define SELECT_64_86(x64, x86) (this->isx64 ? (x64) : (x86))
#define GET_POINTER(base, offset) (user_addr_t)SELECT_64_86(*(uint64_t *)((base)+sizeof(uint64_t)*(offset)), *(uint32_t *)((base)+sizeof(uint32_t)*(offset)))
this->ptrsize=SELECT_64_86(sizeof(uint64_t),sizeof(uint32_t));
@alexrinass
alexrinass / .gitconfig
Created July 6, 2011 12:55
Git config
[user]
name = Alexander Rinass
email = alex@rinass.net
[core]
editor = mate -w
[github]
user = alexrinass
[color]
branch = auto
diff = auto