This file contains hidden or 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
| set appName to "Terminal" -- openTerminalWindow requires Terminal | |
| set newWindowScript to "tmux -2" -- set to "" to just run the shell | |
| if not isRunning(appName) then tell application appName to activate | |
| if numberOfWindows(appName) is 0 then | |
| openTerminalWindow(appName, newWindowScript) | |
| foregroundApp(appName) | |
| else | |
| if isCurrentApp(appName) then |
This file contains hidden or 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>DVTConsoleDebuggerInputTextColor</key> | |
| <string>0.052 0.489 0.482 1</string> | |
| <key>DVTConsoleDebuggerInputTextFont</key> | |
| <string>Menlo-Bold - 11.0</string> | |
| <key>DVTConsoleDebuggerOutputTextColor</key> | |
| <string>0.432 0.325 0.276 1</string> |
This file contains hidden or 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
| const makeAsync = require('es6-async') | |
| const timeout = (milliseconds) => new Promise(resolve => setTimeout(resolve, milliseconds)) | |
| const random = () => Promise.resolve(Math.random()) | |
| const asyncFunc = makeAsync(function* () { | |
| yield timeout(1000) | |
| return yield random() | |
| }) |
This file contains hidden or 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
| /** | |
| * Uses the `produce` function to produce values until the `predicate` returns false. | |
| * If supplied, each value is transformed by `transform` before being yielded. | |
| * | |
| * @param {Function} produce produces the next value | |
| * @param {Function} predicate return true if the production should continue | |
| * @param {Function} transform transforms the produced value, defaults to identity | |
| */ | |
| function* produceWhile(produce, predicate, transform = value => value) { | |
| while(true) { |
This file contains hidden or 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
| extension Optional { | |
| func both_then<T, U>(_ other: Optional<U>, f: (Wrapped, U) -> T) -> Optional<T> { | |
| guard let a = self, let b = other else { return nil } | |
| return f(a, b) | |
| } | |
| func neither<T>(_ other: Optional<T>) -> Bool { | |
| return self == nil && other == nil | |
| } |
This file contains hidden or 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
| - (id<RACSignal>)startWithTrigger:(id<RACSignal>)signalTrigger | |
| { | |
| return [RACSignal createSignal:^(id<RACSubscriber> subscriber) { | |
| __block RACDisposable *selfDisposable = nil; | |
| __block RACDisposable *triggerDisposable = [signalTrigger subscribe:[RACSubscriber subscriberWithNext:^(id x) { | |
| selfDisposable = [self subscribeNext:^(id x2) { | |
| [subscriber sendNext:x2]; | |
| } error:^(NSError *error) { | |
| [subscriber sendError:error]; | |
| } completed:^{ |
This file contains hidden or 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
| #import "TCRACSocket.h" | |
| #import <AsyncSocket.h> | |
| @interface TCRACSocket () | |
| @property(strong,readwrite) AsyncSocket *sock; | |
| @property(strong) RACSubject *connectSubject; | |
| @property(strong) RACSubject *linesSubject; | |
| @end | |
| @implementation TCRACSocket |
This file contains hidden or 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
| /* | |
| * debug.c | |
| * Easy Shop | |
| * | |
| * Created by Mikael Hallendal on 2010-08-18. | |
| * | |
| */ | |
| #include "debug.h" |
This file contains hidden or 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>Colors</key> | |
| <dict> | |
| <key>Background</key> | |
| <string>0.028 0.089 0.104</string> | |
| <key>InsertionPoint</key> | |
| <string>0.926 0.940 0.758</string> |
This file contains hidden or 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
| # | |
| # rb_main.rb | |
| # MacRubyTest | |
| # | |
| # Loading the Cocoa framework. If you need to load more frameworks, you can | |
| # do that here too. | |
| framework 'Cocoa' | |
| # Loading all the Ruby project files. |
NewerOlder