- Introduction to Functional Programming Johannes Weiß - https://vimeo.com/100786088
- ReactiveCocoa at MobiDevDay Andrew Sardone - https://vimeo.com/65637501
- The Future Of ReactiveCocoa Justin Spahr-Summers - https://www.youtube.com/watch?v=ICNjRS2X8WM
- Enemy of the State Justin Spahr-Summers - https://www.youtube.com/watch?v=7AqXBuJOJkY
- WWDC 2014 Session 229 - Advanced iOS Application Architecture and Patterns Andy Matuschak - https://developer.apple.com/videos/play/wwdc2014/229/
- Functioning as a Functionalist Andy Matuschak - https://www.youtube.com/watch?v=rJosPrqBqrA
- Controlling Complexity in Swift Andy Matuschak - https://realm.io/news/andy-matuschak-controlling-complexity/
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
git reset HEAD^ # remove commit locally | |
git push origin +HEAD # force-push the new HEAD commit | |
git push origin +HEAD^:<name of your branch, most likely 'master'> # Ex: git push origin +HEAD^:Ring_master |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.user.loginscript</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/path/to/executable/script.sh</string> | |
</array> |
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 | |
# 只要執行 mount_ramdisk.sh 就會建立一個 4GB 的 RAM disk, | |
# 執行 mount_ramdisk.sh 2 就會建立一個 2GB 的 RAM disk, | |
# 執行 mount_ramdisk.sh -u 就可以卸載掉 RAM disk: | |
RAM_DISK_GB=4 | |
RAM_DISK_NAME=RamDisk | |
MOUNTED_RAM_DISK_FOLDER="/Volumes/${RAM_DISK_NAME}" | |
# Unmount RAM disk |
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 | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |
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
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
// .... | |
NSDictionary *activityDic = [launchOptions objectForKey:UIApplicationLaunchOptionsUserActivityDictionaryKey]; | |
if (activityDic) { | |
NSUserActivity * userActivity = [activityDic valueForKey:@"UIApplicationLaunchOptionsUserActivityKey"]; | |
if ([userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) { | |
return YES; // << return YES, and handle it in application:continueUserActivity:restorationHandler: | |
} |
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
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler | |
{ | |
if ([userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) { | |
NSURL *webpageURL = userActivity.webpageURL; | |
NSString *host = webpageURL.host; | |
if ([host isEqualToString:@"yourDomain.com"]) { | |
// do something here | |
return YES; // YES to indicate that your app handled the activity | |
} |
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 | |
DEFAULT_URL=http://updates.jenkins-ci.org/current/latest/jenkins.war | |
TMP_PATH=/tmp/jenkins.war | |
APP_PATH=/Applications/Jenkins/jenkins.war | |
PLIST_PATH=/Library/LaunchDaemons/org.jenkins-ci.plist | |
url=${1-$DEFAULT_URL} | |
echo 'Downloading WAR package...' |
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
{ | |
"applinks": { | |
"apps": [], | |
"details": [ | |
{ | |
"appID": "9JA89QQLNQ.com.apple.wwdc", | |
"paths": [ "/wwdc/news/", "/videos/wwdc/2015/*"] | |
}, | |
{ | |
"appID": "ABCD1234.com.apple.wwdc", |
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
{ | |
"aps": { | |
"sound": "", | |
"content-available": 1 | |
}, | |
"custom_key": { | |
"custom_key_1": "custom_value_1", | |
"custom_key_2": "custom_value_2" | |
} | |
} |