Skip to content

Instantly share code, notes, and snippets.

@egonSchiele
egonSchiele / install_homebrew.rb
Created July 2, 2012 06:41
less annoying install_homebrew.rb
#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
# This script installs to /usr/local only. To install elsewhere you can just
# untar https://github.com/egonSchiele/homebrew/tarball/master anywhere you like.
module Tty extend self
def blue; bold 34; end
def white; bold 39; end
def red; underline 31; end
def reset; escape 0; end
def bold n; escape "1;#{n}" end
@egonSchiele
egonSchiele / soconnect.d
Created March 10, 2012 20:23
Brendan Gregg's soconnect.d script
#!/usr/sbin/dtrace -s
#pragma D option quiet
#pragma D option switchrate=10hz
inline int af_inet = 2; /* AF_INET defined in bsd/sys/socket.h */
inline int af_inet6 = 30; /* AF_INET6 defined in bsd/sys/socket.h */
/* from http://dtracebook.com/index.php/Network_Lower_Level_Protocols:soconnect.d#Mac_OS_X */
@egonSchiele
egonSchiele / hfsslower.d
Created March 10, 2012 19:20
copy of Brenden Gregg's hfsslower.d
#!/usr/sbin/dtrace -s
#pragma D option quiet
#pragma D option defaultargs
#pragma D option switchrate=10hz
/* from http://dtrace.org/blogs/brendan/2011/10/10/top-10-dtrace-scripts-for-mac-os-x/ */
dtrace:::BEGIN
{
@egonSchiele
egonSchiele / canny.cpp
Created December 28, 2010 02:42
Adding automatic thresholding to cvCanny in OpenCV
// new
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//