Skip to content

Instantly share code, notes, and snippets.

View florianbachmann's full-sized avatar
💭
rock n roll

Flori florianbachmann

💭
rock n roll
View GitHub Profile
#import <Foundation/Foundation.h>
@class CKRecordID;
@interface CKCPartialErrorItem : NSObject
@property (strong) NSError *error;
@property (strong) CKRecordID *recordID;
@end
@class CKRecord;
@coderbyheart
coderbyheart / startupweeken-rheinmain-2012.md
Last active August 29, 2015 14:07
Startup Weekend RheinMain 2012

Img

Am Wochenende rund um den 1. Juni 2012 fand im FIZ in Frankfurt das erste Startup Weekend hier im RheinMain-Gebiet statt. Ich hatte mich schon frühzeitig angemeldet um mit meinem Projekt re:text dort teil zu nehmen. Ziel eines Startup Weekends ist es, für neue Ideen Mitstreiter zu finden und bereits am Wochenende diese Idee zu einem tragfähigen Konzept auszubauen. Hierzu stellt man in einem 60-Sekunden-Pitch die Idee vor allen Teilnehmern vor, in der anschließenden Abstimmungsphase werden von jedem Teilnehmer drei Punkte an seine Lieblingsidee vergeben. Die Ideen mit den meisten Punkten dürfen dann am Wochenende bearbeitet werden. An dieser Veranstaltung waren etwa 120 Teilnehmer anwesend, die sich zu 15 Teams zusammenfinden sollten – am Sonntag sind davon zehn Teams übrig geblieben. Über das Wochenende stehen den Teams erfahren Mentoren zur Seite, die diese bei

@asciidisco
asciidisco / nodestuff.js
Created November 8, 2013 14:26
nodestuff
// config.js
module.exports = {
dev: {
dbname: 'foo',
host: '127.0.0.1',
pass: 'bar',
port: 1223
},
prod: {
dbname: 'baz',
@boredzo
boredzo / wwdc2013index-redacted.txt
Last active December 18, 2015 12:59
Script to rename WWDC videos and slides PDFs to include the session title in the name. Also included: A list of the session numbers and (redacted where necessary) titles, in TSV format, for use with this script.
100 Keynote
101 Platforms State of the Union
102 Apple Design Awards
109 Painting the Future
200 Accessibility in OS X
201 Building User Interfaces for iOS 7
202 Accessibility in iOS
203 What’s New in Cocoa Touch
204 What’s New with Multitasking
205 What’s New in Cocoa
@jspahrsummers
jspahrsummers / gist:5780224
Last active September 26, 2019 05:24
Untested proof of concept for a better @weakify macro.
#define $(...) \
({ \
__weak __typeof__(self) weakSelf = self; \
\
^(__VA_ARGS__) { \
__strong __typeof__(weakSelf) self = weakSelf; \
$_body_
#define $_body_(...) \
__VA_ARGS__ \
@goshacmd
goshacmd / fix_sys_rb.sh
Created June 12, 2013 07:41
OS X [REDACTED] Ruby 2.0 headers fix.
sys_rb_usr=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr
sdk_rb_usr=`xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr
sudo cp -r $sdk_rb_usr/include $sys_rb_usr/include
@steipete
steipete / PSPDFUIKitMainThreadGuard.m
Last active March 10, 2024 19:23
This is a guard that tracks down UIKit access on threads other than main. This snippet is taken from the commercial iOS PDF framework http://pspdfkit.com, but relicensed under MIT. Works because a lot of calls internally call setNeedsDisplay or setNeedsLayout. Won't catch everything, but it's very lightweight and usually does the job.You might n…
// Taken from the commercial iOS PDF framework http://pspdfkit.com.
// Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved.
// Licensed under MIT (http://opensource.org/licenses/MIT)
//
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it.
// PLEASE DUPE rdar://27192338 (https://openradar.appspot.com/27192338) if you would like to see this in UIKit.
#import <objc/runtime.h>
#import <objc/message.h>
@indragiek
indragiek / gist:5297435
Last active March 5, 2023 21:55
Draft of a ReactiveCocoa based interface for CoreData
//
// FGOManagedObjectContextStack.h
//
// Created by Indragie Karunaratne on 2012-12-23.
//
#import <Foundation/Foundation.h>
typedef void (^FGOConfigurationBlock)(id);
@MrRooni
MrRooni / gist:4988922
Created February 19, 2013 19:16
UITableView and NSFetchedResultsController: Updates Done Right
@interface SomeViewController ()
// Declare some collection properties to hold the various updates we might get from the NSFetchedResultsControllerDelegate
@property (nonatomic, strong) NSMutableIndexSet *deletedSectionIndexes;
@property (nonatomic, strong) NSMutableIndexSet *insertedSectionIndexes;
@property (nonatomic, strong) NSMutableArray *deletedRowIndexPaths;
@property (nonatomic, strong) NSMutableArray *insertedRowIndexPaths;
@property (nonatomic, strong) NSMutableArray *updatedRowIndexPaths;
@end
@rpitting
rpitting / gist:4753669
Last active December 12, 2015 09:39
Well, I really did not notice this really slooooooooooow fadeout of my *beautiful* scrollview shadows.
- (void) fadeOutShadowsSuchThatReinerWontNotice
{
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"yyyy-MM-dd HH:mm:ss zzz"];
NSDate *fadeOutStartDate = [df dateFromString:@"2013-01-21 15:00:00 +0100"];
NSDate *fadeOutEndDate = [df dateFromString:@"2013-01-25 18:00:00 +0100"];
NSDate *now = [NSDate date];
float blendValue = (now.timeIntervalSince1970 - fadeOutStartDate.timeIntervalSince1970) /
(fadeOutEndDate.timeIntervalSince1970 - fadeOutStartDate.timeIntervalSince1970);