Skip to content

Instantly share code, notes, and snippets.

View exalted's full-sized avatar
🏠
Working from home

Ali Servet Donmez exalted

🏠
Working from home
View GitHub Profile
@jehiah
jehiah / git-branch-status
Last active March 21, 2024 12:39
show git ahead/behind info for branches
moved to github --> https://github.com/bill-auger/git-branch-status/
@exalted
exalted / NSString+Punctuation.h
Created December 10, 2010 00:50
String capitalization for NSString while keeping roman numerals all capitalized.
//
// NSString+Punctuation.h
// by Ali Servet Donmez <asd NOSPAM pittle.org>, 2010
// http://www.pittle.org/
//
/*
* Requirements
* ------------
* - "RegexKitLite" (http://regexkit.sourceforge.net/#RegexKitLite)
@exalted
exalted / gist:726910
Created December 3, 2010 12:42
This will convert DateTime (.NET) object serialized as JSON by WCF to a NSDate object
/*
* This will convert DateTime (.NET) object serialized as JSON by WCF to a NSDate object.
*/
// Input string is something like: "/Date(1292851800000+0100)/" where
// 1292851800000 is milliseconds since 1970 and +0100 is the timezone
NSString *inputString = [item objectForKey:@"DateTimeSession"];
// This will tell number of seconds to add according to your default timezone
// Note: if you don't care about timezone changes, just delete/comment it out