Installing Supervisor on OS X is simple:
sudo pip install supervisor
This assumes you have pip. If you don't:
| # Keep in mind that when asking for a `return` after another, only the first one will be output. | |
| # This example is meant as a simple starting point, to show how to get the information in the simplest available way. | |
| # Google Chrome | |
| tell application "Google Chrome" to return URL of active tab of front window | |
| tell application "Google Chrome" to return title of active tab of front window | |
| # Google Chrome Canary | |
| tell application "Google Chrome Canary" to return URL of active tab of front window | |
| tell application "Google Chrome Canary" to return title of active tab of front window | |
| # Chromium |
| #!/bin/bash | |
| # | |
| # 通过对比 ping 响应时间,找到本机最快的上传ip | |
| # Travis@fir.im | |
| # | |
| # 使用方法: | |
| # sh -c "$(curl -sSL https://gist.githubusercontent.com/trawor/5dda140dee86836b8e60/raw/turbo-qiniu.sh)" | |
| echo "# 这个脚本理论上可以帮你获取任意域名的最快速的IP" | |
| echo "# 获取IP列表的服务由 17ce.com 提供, 非常感谢有这么好的免费服务!" |
| /* | |
| --------------------------------------------------------------------------------------- | |
| Obj-C Literal Dictionary Syntax - Multiple reasons for allowing nil values | |
| Radar 19747372 | |
| --------------------------------------------------------------------------------------- | |
| The obj-c literal syntax for dictionaries does not allow nils. | |
| @{key : nil}; // Exception (and compiler error) | |
| // USAGE: | |
| // Call RestorationDefender.printViewControllerClassesThatAreProbablyNotRestorable() to print a list of view controllers that will probably not return from state restoration. | |
| // Call RestorationDefender.crashWhenViewControllersDoNotImplementStateRestoration() to crash your app when a view controller appears without setting restorationIdentifier and restorationClass. | |
| // Call RestorationDefender.shoutWhenViewControllersDoNotImplementStateRestoration() to print a big message when a view controller appears without setting restorationIdentifier and restorationClass. | |
| import Foundation | |
| private func objc_getClassList() -> [AnyClass] { | |
| let expectedClassCount = objc_getClassList(nil, 0) | |
| var allClasses = UnsafeMutablePointer<AnyClass?>.alloc(Int(expectedClassCount)) |
| #import <Foundation/Foundation.h> | |
| #include <objc/objc-api.h> | |
| #include <objc/runtime.h> | |
| #include <malloc/malloc.h> | |
| #include <mach/mach.h> | |
| @interface TEST : NSObject | |
| @end | |
| @implementation TEST |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "net" | |
| "net/mail" | |
| "net/smtp" | |
| "crypto/tls" | |
| ) |
| #include <assert.h> | |
| #include <roxlu/core/Utils.h> | |
| #include <roxlu/core/Log.h> | |
| #include "YUV420PGrabber.h" | |
| YUV420PGrabber::YUV420PGrabber() | |
| :y_prog(0) | |
| ,y_vert(0) | |
| ,y_frag(0) | |
| ,uv_prog(0) |
| #import <Foundation/Foundation.h> | |
| int main(int argc, const char * argv[]) | |
| { | |
| NSRunLoop * runLoop; | |
| CLIMain * main; // replace with desired class | |
| @autoreleasepool | |
| { | |
| // create run loop |