git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| [{ "Note": "The first two digits (ranging from 10–43) correspond to the province, while the last two digits correspond either to the city/delivery zone (range 01–50) or to the district/delivery zone (range 51–99). Afghanistan Postal code lookup", "Country": "Afghanistan", "ISO": "AF", "Format": "NNNN", "Regex": "^\\d{4}$"}, { "Note": "With Finland, first two numbers are 22.", "Country": "Åland Islands", "ISO": "AX", "Format": "NNNNN", "Regex": "^\\d{5}$"}, { "Note": "Introduced in 2006, gradually implemented throughout 2007.", "Country": "Albania", "ISO": "AL", "Format": "NNNN", "Regex": "^\\d{4}$"}, { "Note": "First two as in ISO 3166-2:DZ", "Country": "Algeria", "ISO": "DZ", "Format": "NNNNN", "Regex": "^\\d{5}$"}, { "Note": "U.S. ZIP codes (range 96799)", "Country": "American Samoa", "ISO": "AS", "Format": "NNNNN (optionally NNNNN-NNNN or NNNNN-NNNNNN)", "Regex": "^\\d{5}(-{1}\\d{4,6})$"}, { "Note": |
| func debounce( delay:NSTimeInterval, #queue:dispatch_queue_t, action: (()->()) ) -> ()->() { | |
| var lastFireTime:dispatch_time_t = 0 | |
| let dispatchDelay = Int64(delay * Double(NSEC_PER_SEC)) | |
| return { | |
| lastFireTime = dispatch_time(DISPATCH_TIME_NOW,0) | |
| dispatch_after( | |
| dispatch_time( | |
| DISPATCH_TIME_NOW, |
| #!/usr/bin/env ruby | |
| require 'JSON' | |
| device_types = JSON.parse `xcrun simctl list -j devicetypes` | |
| runtimes = JSON.parse `xcrun simctl list -j runtimes` | |
| devices = JSON.parse `xcrun simctl list -j devices` | |
| devices['devices'].each do |runtime, runtime_devices| | |
| runtime_devices.each do |device| |
| @interface NSFileManager (DoNotBackup) | |
| - (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL; | |
| @end |
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Text; | |
| namespace SuffixTreeAlgorithm | |
| { | |
| public class SuffixTree | |
| { |
| #import "NSObject+PWObject.h" | |
| @implementation NSObject (PWObject) | |
| - (void)performBlock:(void (^)(void))block afterDelay:(NSTimeInterval)delay { | |
| int64_t delta = (int64_t)(1.0e9 * delay); | |
| dispatch_after(dispatch_time(DISPATCH_TIME_NOW, delta), dispatch_get_main_queue(), block); | |
| } | |
| @end |
| @implementation MySharedThing | |
| + (id)sharedInstance | |
| { | |
| DEFINE_SHARED_INSTANCE_USING_BLOCK(^{ | |
| return [[self alloc] init]; | |
| }); | |
| } | |
| @end |