Skip to content

Instantly share code, notes, and snippets.

View sumchattering's full-sized avatar
🎯
Focusing

Sumeru Chatterjee sumchattering

🎯
Focusing
View GitHub Profile
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
@interface NSNotificationCenter (AllObservers)
- (NSSet *) my_observersForNotificationName:(NSString *)notificationName;
@end
@0xced
0xced / UIDevice+HostUUID.h
Created April 15, 2012 22:26
Alternative iOS device unique identifier
#import <UIKit/UIKit.h>
@interface UIDevice (HostUUID)
- (NSString *) xcd_uniqueIdentifier;
@end
@avar
avar / 30-income-calculon.pl
Last active February 12, 2024 18:34
Calculate your income in The Netherlands with and without a 30% ruling.
# To check if this is up-to-date with the tax rates go to
# http://www.expatax.nl/tax-rates-2016.php and see if there's anything
# newer there.
#
# I make no guarantees that any of this is correct. I calculated this
# at the time and have been updating it when new tax rates come along
# because people keep finding this useful.
#
# There's also an interactive JS version of this created by
# @stevermeister at
@aronwoost
aronwoost / README.md
Created July 25, 2011 19:46
How to install LAMP on a EC2 Amazon AMI

Launch the instance and connect with ssh.

##Update the server

sudo yum update

##Install php and MySQL packages

@sumchattering
sumchattering / appledocgen.sh
Created July 12, 2011 09:20
Script to be used within xcode as a build phase to generate documentation with appledoc
#!/bin/sh
# Script to be used within xcode to generate documentation through appledoc
# Prior to the execution of this script the appledoc executable and templates should have been copied
# to the appledoc folder in the project root directory
#
# Created by Sumeru Chatterjee when he was awake till 7 AM on July 12 2011
# https://gist.github.com/1077672
#Company Name the only variable that I cant seem to grab from the environment_variables
COMPANY=My_Company_Name
#!/usr/bin/env python
# Nicolas Seriot
# 2011-01-06
# https://gist.github.com/768457
"""
Input: path of an Objective-C project
Output: import dependancies Graphviz format
@0xced
0xced / absim.sh
Created March 11, 2010 21:25
Use your own Address Book in the iPhone Simulator
#!/bin/bash
cd ~/Library/Application\ Support/MobileSync/Backup
backup=`ls -t1 | sed -n '1p'` # most recent backup
for f in "$backup"/*.mdinfo; do
grep -q "Library/AddressBook/AddressBook.sqlitedb" $f
if [ $? -eq 0 ]; then
addressbook=`basename $f .mdinfo`
cp -v "`pwd`/$backup/$addressbook.mddata" ~/Library/Application\ Support/iPhone\ Simulator/User/Library/AddressBook/AddressBook.sqlitedb
exit $?