Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| #!/bin/zsh | |
| # pkgAndNotarize.sh | |
| # 2019 - Armin Briegel - Scripting OS X | |
| # place a copy of this script in in the project folder | |
| # when run it will build for installation, | |
| # create a pkg from the product, | |
| # upload the pkg for notarization and monitor the notarization status |
| <!-- Maker Link by @levelsio --> | |
| <!-- MIT License --> | |
| <style> | |
| body { | |
| background:#333; | |
| } | |
| .levelsio-by { | |
| font-family:"Helvetica Neue",sans-serif; | |
| right:0; |
| import Cocoa | |
| // Support Foundation calls on String | |
| public extension String { public var ns: NSString {return self as NSString} } | |
| /// Custom Labeled Playground-Based Drag-and-Drop window | |
| public class DropView: NSTextField { | |
| // Default action handler | |
| public var handler: ([String]) -> Void = { paths in Swift.print(paths) } |
| // | |
| // QLCDispatchAsyncWithCompletionAndTimeout.m | |
| // Blocks-WaitUntilDate | |
| // | |
| // Created by Prachi Gauriar on 12/23/2013. | |
| // Copyright (c) 2013 Prachi Gauriar. | |
| // | |
| // 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 |
| // Taken from http://PSPDFKit.com. This snippet is under public domain. | |
| #define UIKitVersionNumber_iOS_7_0 0xB57 | |
| BOOL PSPDFIsUIKitFlatMode(void) { | |
| static BOOL isUIKitFlatMode = NO; | |
| static dispatch_once_t onceToken; | |
| dispatch_once(&onceToken, ^{ | |
| // We get the modern UIKit if system is running >= iOS 7 and we were linked with >= SDK 7. | |
| if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_7_0) { | |
| isUIKitFlatMode = (NSVersionOfLinkTimeLibrary("UIKit") >> 16) >= UIKitVersionNumber_iOS_7_0; | |
| } |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| @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 |
| // this chunk of code loads a jpeg image into a cgimage | |
| // creates a second crop of the original image with CGImageCreateWithImageInRect | |
| // writes the new cropped image to the desktop | |
| // ensure that the xy origin of the CGRectMake call is smaller than the width or height of the original image | |
| NSURL *originalImage = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"lockwood" ofType:@"jpg"]]; | |
| CGImageRef imageRef = NULL; | |
| CGImageSourceRef loadRef = CGImageSourceCreateWithURL((CFURLRef)originalImage, NULL); | |
| if (loadRef != NULL) |
| #!/usr/bin/python | |
| # fix-xcode | |
| # Rob Napier <[email protected]> | |
| # Script to link in all your old SDKs every time you upgrade Xcode | |
| # Create a directory called /SDKs (or modify source_path). | |
| # Under it, put all the platform directories: | |
| # MacOSX.platform iPhoneOS.platform iPhoneSimulator.platform | |
| # Under those, store the SDKs: |