Public Gists by robrix

Gravatar
Thu Aug 20 15:56:14 -0700 2009
1
char*b=" bottles of beer",*w=" on the wall";for(int i=100;i>0;i--)printf("%u%s%s %u%s take 1 down pass it around %d%s%s",i,b,w,i,b,i-1,b,w);
gist: 162745 Copy and deep copy for NSMa...
Gravatar
Wed Aug 05 08:03:35 -0700 2009
1
2
3
/*
This makes some assumptions about your code, for example that you’ve got ownership rules set up properly. If a relationship to another entity uses the cascade deletion rule, it’s considered to be owned by the receiver, and thus will be copied by -deepCopyWithZone:.
*/
gist: 141808 Select the passed-in paths ...
Gravatar
Mon Jul 06 18:28:18 -0700 2009
1
2
3
#!/usr/bin/env ruby -rubygems
# pass this script some paths, e.g. `find . -name '*.m' | select_in_finder` and it will select them in the Finder. Works best with List View.
require "appscript"
gist: 141807 Print simple class document...
Gravatar
Mon Jul 06 18:24:04 -0700 2009
1
2
3
#!/usr/bin/env ruby
 
# print an overview of the classes you have tested, drawn from the test names.
gist: 141714 Quick access to Mac and iPh...
Gravatar
Mon Jul 06 14:50:07 -0700 2009
1
2
3
#!/usr/bin/env ruby
# put this somewhere in your path, and symlink some other common prefixes to it, e.g. ca, cf, cg, dom, eagl, gl, glu, ib, ui, web
# then invoke it with the appropriate prefix: `ns array` or `ui tableview` or `cf type` or `ea
gist: 141712 Unquarantine the passed-in ...
Gravatar
Mon Jul 06 14:42:53 -0700 2009
1
2
3
#!/bin/bash
 
find $@ -type f -print0 | xargs -0 xattr -d com.apple.quarantine 2>/dev/null
gist: 116125 Trigger this script with e....
Gravatar
Fri May 22 06:35:06 -0700 2009
1
2
3
-- fixme: assumes that the menubar and dock are on this screen, and that the dock is at the bottom
 
tell application "Finder"
gist: 99483 A quick Ruby script to open...
Gravatar
Tue Apr 21 17:09:39 -0700 2009
1
2
3
#!/usr/bin/env ruby
# q is for query