Size | What it means |
---|---|
▁ S | 💅 I can get this done in one session at the computer with no breaks |
▃ M | ☕ This will require breaks, less than a day |
▅ L | 💦 This will require more than one day |
▇ XL | 😱 Rare! This will require a week or more. Try breaking into multiple smaller issues |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Most NSString instances will actually be __NSCFString instances, so here are both NSString and __NSCFString implementations. | |
* If you know how to create an NSString instance whose class is actually NSString please let me know. | |
* Other possible concrete subclasses of NSString are: NSConstantString, __NSCFConstantString, NSPathStore2, NSSimpleCString and __NSLocalizedString. | |
*/ | |
// CoreFoundation.framework 635.19.0 (Mac OS X 10.7.3) | |
@implementation NSObject | |
- (BOOL) isNSString__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Example usage: | |
# ./macroview.sh -IThirdPartyHeadersToInclude file.m | |
clang -E -nostdinc -nobuiltininc "$@" 2>/dev/null | indent -bl -nce -nei |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# usage: get [ RESOLUTION [ YEAR [ IDS... ] ] ] | |
resolution=${1:-SD} | |
year=${2:-2015} | |
shift | |
shift | |
ids=$* | |
RESOLUTION=$(echo $resolution | tr '[:lower:]' '[:upper:]') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DraggableClipView: NSClipView | |
{ | |
private var clickPoint: NSPoint! | |
private var originalOrigin: NSPoint! | |
override func mouseDown(event: NSEvent) { | |
clickPoint = event.locationInWindow | |
originalOrigin = bounds.origin | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*: | |
This is a concept re-implementation of the @Binding and @State property wrappers from SwiftUI | |
The only purpose of this code is to implement those wrappers myself | |
just to understand how they work internally and why they are needed, | |
⚠️ This is not supposed to be a reference implementation nor cover all | |
subtleties of the real Binding and State types. | |
The only purpose of this playground is to show how re-implementing | |
them myself has helped me understand the whole thing better |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Applescript: tell application "System Preferences" to get anchors of current pane | |
// Result: | |
// { anchor "Privacy_Reminders" of pane id "com.apple.preference.security" of application "System Preferences", | |
// anchor "Privacy_SystemServices" of pane id "com.apple.preference.security" of application "System Preferences", | |
// anchor "Privacy_Calendars" of pane id "com.apple.preference.security" of application "System Preferences", | |
// anchor "Firewall" of pane id "com.apple.preference.security" of application "System Preferences", | |
// anchor "Privacy_Assistive" of pane id "com.apple.preference.security" of application "System Preferences", | |
// anchor "Privacy_LinkedIn" of pane id "com.apple.preference.security" of application "System Preferences", | |
// anchor "Privacy_Accessibility" of pane id "com.apple.preference.security" of application "System Preferences", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public extension Folder { | |
/// Create a new uniquely-named file within this folder. | |
/// - Parameter prefix: (optional) prefix to add the temporary file name | |
/// - Parameter fileExtension: (optional) file extension (without the `.`) to use for the created file | |
/// - Parameter contents: (optional) the data to write to the file | |
/// - throws: `WriteError` if a new file couldn't be created. | |
func createTemporaryFile(prefix: String? = nil, fileExtension: String? = nil, contents: Data? = nil) throws -> File { | |
var tempFilename = "" | |
if let prefix = prefix { | |
tempFilename += prefix + "_" |
OlderNewer