Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| /* | |
| DESCRIPTION | |
| ----------- | |
| Use NodeJS to read RFID ids through the USB serial stream. Code derived from this forum: | |
| http://groups.google.com/group/nodejs/browse_thread/thread/e2b071b6a70a6eb1/086ec7fcb5036699 | |
| CODE REPOSITORY | |
| --------------- | |
| https://gist.github.com/806605 |
| /* The API controller | |
| Exports 3 methods: | |
| * post - Creates a new thread | |
| * list - Returns a list of threads | |
| * show - Displays a thread and its posts | |
| */ | |
| var Thread = require('../models/thread.js'); | |
| var Post = require('../models/post.js'); |
| #import <UIKit/UIKit.h> | |
| #import <ImageIO/ImageIO.h> | |
| #import <MobileCoreServices/MobileCoreServices.h> | |
| - (void)exportAnimatedGif | |
| { | |
| UIImage *shacho = [UIImage imageNamed:@"shacho.png"]; | |
| UIImage *bucho = [UIImage imageNamed:@"bucho.jpeg"]; | |
| NSString *path = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"animated.gif"]; |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| - (RACSignal *)enqueueRequestWithMethod:(NSString *)method path:(NSString *)path parameters:(NSDictionary *)parameters cacheTime:(NSTimeInterval)expirationTime { | |
| NSAssert(self.cluster, @"cluster should be set before request."); | |
| NSAssert(self.applicationID.length != 0, @"applicationID should be set before request."); | |
| NSMutableURLRequest *request = [self requestWithMethod:method path:path parameters:parameters]; | |
| RACSignal *signal = [RACSignal createSignal:^(id<RACSubscriber> subscriber) { | |
| AFHTTPRequestOperation *operation; | |
| operation = [self HTTPRequestOperationWithRequest:request success:^(AFHTTPRequestOperation *op, id JSON) { | |
| NSDictionary *errorDictionary = JSON[@"error"]; |
| import Foundation | |
| extension Character { | |
| func utf8() -> UInt8 { | |
| let utf8 = String(self).utf8 | |
| return utf8[utf8.startIndex] | |
| } | |
| } | |
| func encrypt(c:Character, key:Character) -> String { |
| func createGIF(with images: [UIImage], loopCount: Int = 0, frameDelay: Double, callback: (data: NSData?, error: NSError?) -> ()) { | |
| let fileProperties = [kCGImagePropertyGIFDictionary as String: [kCGImagePropertyGIFLoopCount as String: loopCount]] | |
| let frameProperties = [kCGImagePropertyGIFDictionary as String: [kCGImagePropertyGIFDelayTime as String: frameDelay]] | |
| let documentsDirectory = NSTemporaryDirectory() | |
| let url = NSURL(fileURLWithPath: documentsDirectory)?.URLByAppendingPathComponent("animated.gif") | |
| if let url = url { | |
| let destination = CGImageDestinationCreateWithURL(url, kUTTypeGIF, UInt(images.count), nil) | |
| CGImageDestinationSetProperties(destination, fileProperties) |
Here's my own list of the interesting stuff announced during this year's WWDC, collected from the keynotes, various Apple docs, blog posts and tweets.
If you're planning to watch the videos, I really recommend this Mac app that helps you download and watch them: https://github.com/insidegui/WWDC.
http://www.apple.com/osx/elcapitan-preview/
| // | |
| // Store.swift | |
| // | |
| // Created by Daniel Tartaglia on 3/11/17. | |
| // Copyright © 2020 Daniel Tartaglia. MIT License | |
| // | |
| import Foundation | |
| import RxSwift |