Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
shipping

Felix Krause KrauseFx

🚀
shipping
View GitHub Profile
View Lanes.rb
before_all do
increment_build_number
cocoapods
xctool :test
end
lane :beta do
sigh :adhoc
deliver :beta
hockey
@KrauseFx
KrauseFx / DeviceSwitcherForSubliminal.rb
Created Nov 1, 2014
This script runs through all the devices and generates a HTML page, viewing all the images
View DeviceSwitcherForSubliminal.rb
require 'JSON'
class Runner
def Runner.run
system("xcodebuild clean")
config = {
"devices": [
"iPhone 6 Plus (8.1 Simulator)",
"iPhone 6 (8.1 Simulator)",
View FMDPart3.m
[_writeQueueLock lock];
[_queue inDatabase:^(FMDatabase *db) {
FMResultSet *res = [db executeQuery:@"..."];
if ([res next]) {
...
}
[res close];
}];
[_writeQueueLock unlock];
View FMDBPart3.m
[_writeQueue addOperationWithBlock:^{
[_writeQueueLock lock];
[_queue inDatabase:^(FMDatabase *db) {
if (![db executeUpdate:@"..." withArgumentsInArray:...]) { ... }
}];
[_writeQueueLock unlock];
}];
View FMDBPart1.m
static FMDatabaseQueue *_queue;
static NSOperationQueue *_writeQueue;
static NSRecursiveLock *_writeQueueLock;
View FMDBPart2.m
_queue = [FMDatabaseQueue databaseQueueWithPath:...];
_writeQueue = [NSOperationQueue new];
[_writeQueue setMaxConcurrentOperationCount:1];
_writeQueueLock = [NSRecursiveLock new];
You can’t perform that action at this time.