Contact Eric Marden

x Cancel

Eric Marden

developer & designer

Chicago · xentek.net

posted 2 years ago

Thoughts on the GPL?

After the recent scuff up in the WordPress community over the question of whether or not GPL inheritance applies to themes I was wondering what the forrst community thought about this issue and open source licenses in general.

If you've never thought about this issue, here's a collection of links to get you started: delicious.com/ericmarden/…

posted 2 years ago

My Bash Aliases for SVN

                # SVN
alias svnadd='svn st | grep ? | awk '\''{print "svn add "$2 }'\'' | bash'
alias svnst='svn st --ignore-externals'
alias svnext='svn pe svn:externals .'
alias svnign='svn pe svn:ignore .'
alias delsvn='find . -name .svn | xargs rm -rf'
export LC_CTYPE=en_US.UTF-8
export SVN_EDITOR=/usr/bin/vi                
Raw

Easy add all missing files to the repository, get the status (but ignore the long winded output of any external repos), easily set the svn:externals or svn:ignore properties on the current directory, and remove all .svn folders from the directory tree you're currently sitting in. The last one is useful for when you copy folders around your hard drive that were under version control. Its a poorman's svn export.

posted 2 years ago

Amazon.com: jQuery in Action, Second Edition (9781935182320): Bear Bibeault, Yehuda Katz: Books

http://amzn.to/9a7322

Surprised to see so many jQuery questions on Forrst. If you are serious about jQuery development, do youself a favor and get a copy of jQuery in Action. No other tome illuminated how jQuery works better than this book.

posted 2 years ago

date based quicksort

                function _quicksort( $seq, $sort )
{
	if( !count($seq) ) return $seq;
	
	$k = $seq[0];
	$x = $y = array();
	
	for ($i=1; $i < count($seq); $i++):
		if ( strtotime( $seq[$i]->$sort ) >= strtotime( $k->$sort ) ):
			$x[] = $seq[$i];
		else:
			$y[] = $seq[$i];
		endif;
	endfor;
	
	return array_merge( _quicksort($x, $sort), array($k), _quicksort($y, $sort) );
}                
Raw

An implementation of the quicksort algorithm in PHP. This particular instance sorts by a timestamp, which is assumed to be a property of the objects in the array you pass in.

This is one of the fastest ways I've found to merge and sort disparate arrays by date.

posted 2 years ago

gist: custom .tmux.conf

http://gist.github.com/464724

Customized .tmux.conf file for your multiplexing pleasure.

If you spend any time in ssh, do yourself a favor and learn how to use tmux.