Skip to content

Instantly share code, notes, and snippets.

View simontaen's full-sized avatar

Simon Tännler simontaen

View GitHub Profile
@arnoappenzeller
arnoappenzeller / appbuilders_2016_slides
Last active May 11, 2016 06:44
Link to all slides from App Builders 2016 (On going)
https://speakerdeck.com/jpsim/sourcekit-and-you ("SourceKit and you" by @jpsim)
https://speakerdeck.com/icanzilb/appbuilders-non-technical-ways-to-be-a-better-developer ("Non-technical ways to be a better developer" by @icanzlib)
https://speakerdeck.com/cesarvaliente/refactoring-wunderlist-for-android-episode-i-the-presentation-layer ("Refactoring Wunderlist for Android" by @CesarValiente)
https://speakerdeck.com/akosma/being-a-developer-after-40 ("Being a developer after 40" Medium Post:https://speakerdeck.com/akosma/being-a-developer-after-40 by @akosma)
http://seriot.ch/resources/talks_papers/20160426_error_handling.pdf ("Error Handling" by @nst021)
https://speakerdeck.com/vixentael/upgrading-approaches-to-the-secure-mobile-architectures ("Upgrading approaches to the secure mobile architecture" by @vixental)
http://de.slideshare.net/JohnSundell/dynamic-native-backenddriven-uis-app-builders-2016 ("Dynamic, native, backend-driven UIs" by @johnsundell)
https://speakerdeck.com/smashingmag/dirty-tricks-from-the
@jspahrsummers
jspahrsummers / GHRunLoopWatchdog.h
Created January 28, 2015 20:50
A class for logging excessive blocking on the main thread
/// Observes a run loop to detect any stalling or blocking that occurs.
///
/// This class is thread-safe.
@interface GHRunLoopWatchdog : NSObject
/// Initializes the receiver to watch the specified run loop, using a default
/// stalling threshold.
- (id)initWithRunLoop:(CFRunLoopRef)runLoop;
/// Initializes the receiver to detect when the specified run loop blocks for

Greetings, NSHipsters!

As we prepare to increment our NSDateComponents -year by 1, it's time once again for NSHipster end-of-the-year Reader Submissions! Last year, we got some mind-blowing tips and tricks. With the release of iOS 7 & Mavericks, and a year's worth of new developments in the Objective-C ecosystem, there should be a ton of new stuff to write up for this year.

Submit your favorite piece of Objective-C trivia, framework arcana, hidden Xcode feature, or anything else you think is cool, and you could have it featured in the year-end blowout article. Just comment on this gist below!

Here are a few examples of the kind of things I'd like to see:

  • Using NSStringFromSelector(@selector()) as a safer way to do KVC / KVO / NSCoding.
  • Panic's [rather surprising discovery about the internals of the Lightning Digital AV Adapter](http://www.panic.com/blog/the-lightning-di
@ttscoff
ttscoff / tagfiler.rb
Last active March 22, 2024 18:41
Moves files to folders based on special tags in OS X Mavericks
#!/usr/bin/env ruby
# encoding: utf-8
# tag primary folders =Tagname
# target them with #Tagname
# tag subfolders with @nickname
# target them with :nickname
# if no tagged folder exists but there's a matching folder name, that's used
# otherwise it will create folders based on :tags
# :tags can be strung together :bt:Drafts:testing for nesting
# Only one #Tag and one :path should exist in a file's tags
@marcboquet
marcboquet / Variables.plist
Created July 16, 2013 15:50
Soulver variables useful for iOS design. Based on ‏@marcedwards post: http://bjango.com/articles/soulver/
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SKVariables</key>
<array>
<dict>
<key>enabled</key>
<true/>
<key>name</key>
@steipete
steipete / PSPDFThreadSafeMutableDictionary.m
Last active December 10, 2022 09:37
Simple implementation of a thread safe mutable dictionary. In most cases, you want NSCache instead, but it can be useful in situations where you want to manually control what is evicted from the cache in low memory situations.**Warning:** I only use this for setting/getting keys. Enumeration is not thread safe here and will still throw exception…
//
// PSPDFThreadSafeMutableDictionary.m
//
// Copyright (c) 2013 Peter Steinberger, PSPDFKit GmbH. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@JaviSoto
JaviSoto / gist:5906004
Last active June 27, 2023 10:25
Mark designated initializer at compile time
#define MSDesignatedInitializer(__SEL__) __attribute__((unavailable("Invoke the designated initializer `" # __SEL__ "` instead.")))
// Sample usage:
- (instancetype)initWithObject:(id)object;
- (instancetype)init MSDesignatedInitializer(initWithObject:); // <- This even gets auto-complete.
// Now calling init on this class would throw a warning.
@chrishulbert
chrishulbert / com.plex.plexconnect.plist
Created June 13, 2013 11:08
Launchctl startup script for plex connect
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.plex.plexconnect</string>
<key>WorkingDirectory</key>
<string>/Users/chris/PlexConnect</string>
<key>ProgramArguments</key>
@n8henrie
n8henrie / UpdateiOSApps.applescript
Last active March 7, 2018 17:22
Uses UI Scripting to Update iOS Apps in iTunes
(*
Many thanks to those unknowing contributers that share their Applescript on the web. A few that helped with this script include:
- Most of the UI Scripting came from Yoshimasa Niwa here: https://gist.github.com/4223249
- Code for checking if an app is running came from here: http://codesnippets.joyent.com/posts/show/1124
#### n8henrie Sat Mar 16 14:41:41 MDT 2013
* Added several delays that seemed to be responsible for breaking this script in iTunes 11
#### n8henrie Sun Mar 17 09:57:47 MDT 2013
* Added compatibility with iTunes 10 (untested, please confirm if you can)