Skip to content

Instantly share code, notes, and snippets.

Avatar

Benjamin Pearson benjaminpearson

View GitHub Profile
@benjaminpearson
benjaminpearson / .jsbeautifyrc
Created Dec 22, 2014
Style guide .jsbeautifyrc
View .jsbeautifyrc
{
// Details: https://github.com/victorporof/Sublime-HTMLPrettify#using-your-own-jsbeautifyrc-options
// Documentation: https://github.com/einars/js-beautify/
"html": {
},
"css": {
},
"js": {
@benjaminpearson
benjaminpearson / install-npm.sh
Created Nov 28, 2012
Inlight Media - Blog - Scripting with NodeJS
View install-npm.sh
curl http://npmjs.org/install.sh | sudo sh
@benjaminpearson
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
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
Steps:
- 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
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 - https://github.com/i300/TweetBotTabBar
Settings screens without tableviews, etc - https://github.com/escoz/QuickDialog
iOS 5 UUID - https://github.com/gekitz/UIDevice-with-UniqueIdentifier-for-iOS-5
Wrappers for CoreData, MessageCenter replacement for NSNotificationCenter, Components, Categories, Macros - https://github.com/ZaBlanc/iBoost (related blog post: http://raptureinvenice.com/392/)
Swipeable TableViewCells - https://github.com/thermogl/TISwipeableTableView
Tabview replacement all in core graphics - https://github.com/jasonmorrissey/JMTabView
Twitter-like TabBar Arrow - https://github.com/boctor/idev-recipes/tree/master/TabBarAnimation
Twitter-line TabBar (glow, custom) - http://idevrecipes.com/2011/01/04/how-does-the-twitter-iphone-app-implement-a-custom-tab-bar/
@benjaminpearson
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:
http://developers.enormego.com/view/ego_xcode_theme_for_xcode_4_egov2
View gist:1102306
Settings screenshot: http://developinginthedark.com/img/posts/2009/12/apps-for-mac/adium-config-fullsize.jpg
Xtras:
Contact List Style - Color Theme: http://www.adiumxtras.com/index.php?a=xtras&xtra_id=2247
Contact List Style - List Layout: http://www.adiumxtras.com/index.php?a=xtras&xtra_id=3717
Dock icon: http://www.adiumxtras.com/index.php?a=xtras&xtra_id=1100
Menubar icon: http://www.adiumxtras.com/index.php?a=xtras&xtra_id=6088
Remove "Contact signs on" and "Contact signs off" from Events tab. Ridiculously annoying.
@benjaminpearson
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