Skip to content

Instantly share code, notes, and snippets.


Benjamin Pearson benjaminpearson

View GitHub Profile
benjaminpearson / .jsbeautifyrc
Created Dec 22, 2014
Style guide .jsbeautifyrc
View .jsbeautifyrc
// Details:
// Documentation:
"html": {
"css": {
"js": {
benjaminpearson /
Created Nov 28, 2012
Inlight Media - Blog - Scripting with NodeJS
curl | sudo sh
benjaminpearson / custom-pins.m
Created Nov 28, 2012
Inlight Media - Blog - Using the iOS MapKit framework
View custom-pins.m
UIImage *annotationImage = [UIImage imageNamed:@"annotation-image"]; //NOTE: Using a UIImageView will not work
annotationView.image = annotationImage; // NOTE: Make sure annotationView is an instance of MKAnnotationView, not MKPinAnnotation
benjaminpearson / gist:1321051
Created Oct 27, 2011
Remove Whitespace in Xcode as a Build Phase
View gist:1321051
- IMPORTANT: Using this will kill your undo history
- In Xcode > Select your project > "Build Phases" > "Add Build Phase" > "Add Run Script"
- Paste this script:
sed -i '' 's/[[:space:]]*$//' `find . -name *.h -o -name *.m -not \( -name .svn -prune -o -name .git -prune \) -type f`
- Now whitespace will be removed from .h and .m files on build
- Only problem, doesn't work if path contains a space.... any ideas?
benjaminpearson / gist:1297978
Created Oct 19, 2011
Merging iCal Calendars with iCloud
View gist:1297978

When organising my iCal calendars (post iClouding them) and attempting to merge two calendars together, I found iCal would add them but then during the "updating.." process it would delete each event - leaving you with a empty calendar at the end of it.

I eventually resolved this using the following process:

WARNING: As always when messing about with important data. Make sure you back everything up. Exporting all your calendars should be enough. But possibly research other iCal backup techniques.

  1. Right click and export each iCloud calendar that you eventually want to merge.

  2. Create a new local calendar: File > New Calendar > On My Mac

View gist:1177669
TweetBot TabBar -
Settings screens without tableviews, etc -
iOS 5 UUID -
Wrappers for CoreData, MessageCenter replacement for NSNotificationCenter, Components, Categories, Macros - (related blog post:
Swipeable TableViewCells -
Tabview replacement all in core graphics -
Twitter-like TabBar Arrow -
Twitter-line TabBar (glow, custom) -
benjaminpearson / gist:1164698
Created Aug 23, 2011
Rick the Optus POS Robot
View gist:1164698

Rick: Hi there, I"m an Online Service Support Rep. How can I help you today?

Ben: Hi, wondering how i enable call divert / forwarding?

Rick: Sure, will help activate voicemail and setting diversions.

Ben: is it a free service?

Rick: Your voicemail depends on the plan.

View gist:1103868
Xcode Theme:
View gist:1102306
Settings screenshot:
Contact List Style - Color Theme:
Contact List Style - List Layout:
Dock icon:
Menubar icon:
Remove "Contact signs on" and "Contact signs off" from Events tab. Ridiculously annoying.
benjaminpearson / gist:1102194
Last active Mar 5, 2016
Apps for a fresh Mac OS
View gist:1102194
1password - Password mangager
3hub - Amazon s3 file manager
Adium - Instant messenger
Arq - Amazon s3 backup
Air Server - Send your iPhone/iPad screen to your mac screen for demos
Alfred - Launch bar app (must have)
Base - Sqlite db viewer
Caffeine - Keeps computer awake
Charles - Web debugging proxy
Cornerstone - SVN client