Skip to content

Instantly share code, notes, and snippets.

View dlinsin's full-sized avatar

David Linsin dlinsin

View GitHub Profile
@dlinsin
dlinsin / gist:2651183
Created May 10, 2012 05:18
JavaScript-begeisterter Freelancer für mobile Projekt in Köln gesucht
Du liebst das Mobile Web 2.0? Dann suchen wir dich!
Zur kurzfristigen Verstärkung eines unserer Projekt-Teams in Köln suchen wir Dich, wenn Du ein
JavaScript-begeisterter Freelancer bist, der mit Pixelpräzision mobile Frontends bauen kann.
Du hast bereits langjährige Berufserfahrung im Bereich Webseitenentwicklung gesammelt und hohe
Affinität zum Web 2.0? Du kannst Kenntnisse im Umgang mit AJAX und jQuery Entwicklung nachweisen?
Vielleicht gehört auch Ext JS zu Deinem täglichen Brot? Kreativität, ein Faible für Gestaltung und
Gespür für Nutzer-Interaktion zeichnen Dich aus? Hohe Sensibilität für Usability und Accessibility
sind für Dich selbstverständlich? Dann freuen wir uns auf Dich!
@dlinsin
dlinsin / gist:1539886
Created December 30, 2011 13:35
iChat Growl AppleScript
tell application "Growl"
set the allNotificationsList to ¬
{"iChat Message Notification"}
set the enabledNotificationsList to ¬
{"iChat Message Notification"}
register as application ¬
"iChat Message Notification AppleScript" all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
@dlinsin
dlinsin / NSArray+Plist.m
Created September 10, 2011 14:39
Simple category to read plist as array
#import "NSArray+Plist.h"
@implementation NSArray (Plist)
+ (id)arrayFromPlist:(NSString *)filename {
NSData *plistData;
NSString *error;
NSPropertyListFormat format;
id plist;
@dlinsin
dlinsin / constitution
Created August 25, 2011 15:36
AppDev Meet
AppDev Meet version 1.0 in Cologne, Germany.
> What? "AppDev Meet"? Shouldn't it be called "NSCoderNight" or something?
Yes and no! We wanted to start something fresh and new, so we decided to update the name.
> Okay!?! So is it still about code and stuff?
Sure! AppDev Meet is about iOS and Mac development as well as UI/UX-Design. We want to
hang out, code and meet fellow developers and designers from the Cologne area.
@dlinsin
dlinsin / gist:1008470
Created June 4, 2011 23:07
FindAndResignFirstResponder Category
@implementation UIView (FindAndResignFirstResponder)
- (BOOL)findAndResignFirstResponder
{
if (self.isFirstResponder) {
[self resignFirstResponder];
return YES;
}
for (UIView *subView in self.subviews) {
if ([subView findAndResignFirstResponder])
return YES;
- (void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo {
if(application.applicationState == UIApplicationStateActive ) {
DBLog(@"Received: %@", notification.alertBody);
// alert, because app is running in foreground
}
}
@dlinsin
dlinsin / gist:978155
Created May 18, 2011 07:45
Check if starting from UILocalNotification
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
if(application.applicationState == UIApplicationStateActive ) {
DBLog(@"Received: %@", notification.alertBody);
// alert, because app is running in foreground
}
}
@dlinsin
dlinsin / gist:949534
Created April 30, 2011 08:40
UILocalNotification badge
UILocalNotification *notification = [[UILocalNotification alloc] init];
notification.applicationIconBadgeNumber = 3;
// TODO schedule notification
#import "ATMHud.h"
#import "ATMHudQueueItem.h"
hud = [[ATMHud alloc] initWithDelegate:self];
[self.view addSubview:hud.view];
ATMHudQueueItem *item = [[ATMHudQueueItem alloc] init];
item.caption = @"Saving...";
item.showActivity = YES;
[hud addQueueItem:item];
[item release];
#import "ATMHud.h"
hud = [[ATMHud alloc] initWithDelegate:self];
[self.view addSubview:hud.view];
[hud setCaption:@"Successfully saved"];
[hud setImage:[UIImage imageNamed:@"19-check"]];
[hud show];
[hud hideAfter:2.0];