Move directory to directory on root
scp -r ~/Dropbox/Programming/xCode/swift-chat-server [email protected]:~/
copy recursively from to
List processes
| [queue addOperationWithBlock:^{ | |
| dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); | |
| NSURLSession *session = [NSURLSession sharedSession]; // or create your own session with your own NSURLSessionConfiguration | |
| NSURLSessionTask *task = [session dataTaskWithURL:url completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { | |
| if (data) { | |
| // do whatever you want with the data here | |
| } else { | |
| NSLog(@"error = %@", error); |
| // http://stackoverflow.com/a/33729691/2611971 | |
| public class FoundationServer { | |
| public static func listen(port: Int) { | |
| let sock_fd = socket(AF_INET, SOCK_STREAM, 0); | |
| if sock_fd == -1 { | |
| perror("Failure: creating socket") | |
| exit(EXIT_FAILURE) | |
| } | |
| var sock_opt_on = Int32(1) |
| #!/usr/bin/env swift | |
| #if os(OSX) | |
| import Darwin | |
| #else | |
| import Glibc | |
| #endif | |
| import Foundation |
| #!/usr/bin/env swift | |
| #if os(OSX) | |
| import Darwin | |
| #else | |
| import Glibc | |
| #endif | |
| import Foundation |
| /** | |
| This class is used to keep a subscription to an event active. | |
| Set all references to `nil` to no longer receive events | |
| */ | |
| public final class Subscription { | |
| /** | |
| Completiont to run on deinit. | |
| cd $BUILD_DIR | |
| echo "-----> Running Prebuild.2" | |
| if [ -f "./prebuild" ]; | |
| then | |
| sh ./prebuild | |
| else | |
| echo "File does not exist." | |
| fi |
| from swiftdocker/swift | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| run apt-get update; apt-get install -y libssl-dev | |
| run mkdir /deps | |
| workdir /deps | |
| env zewo_version=0.2.0 |
Move directory to directory on root
scp -r ~/Dropbox/Programming/xCode/swift-chat-server [email protected]:~/
copy recursively from to
List processes
1: sign up and setup heroku. Create Heroku app etc.
** EVERYTHING PAST HERE ASSUMES CD IN REPOSITORY **
2: Set build packs: heroku buildpacks:set https://github.com/kylef/heroku-buildpack-swift.git
3: Start Heroku: heroku ps:scale web=1
4: Procfile: web: <#NameOfPackage#> --port=$PORT
GOTCHAS
| - Make a great app | |
| - Create something unique | |
| - Exciting features | |
| - Focus on target market | |
| - Engaging living room experience | |
| - Intuitive use of siri remote | |
| - Fantastic for first-time users | |
| - Performance matters | |
| - Designed for AppleTV | |
| - Understand the process of Apple editors |