#Every Single Option Under The Sun
- optimization level options
- automatic crashing options
- debug info options
- swift internal options
- swift debug/development internal options
- linker-specific options
- mode options
| // Returns number of seconds passed between time when process was created and function was called | |
| func measureAppStartUpTime() -> Double { | |
| var kinfo = kinfo_proc() | |
| var size = MemoryLayout<kinfo_proc>.stride | |
| var mib : [Int32] = [CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid()] | |
| sysctl(&mib, u_int(mib.count), &kinfo, &size, nil, 0) | |
| let start_time = kinfo.kp_proc.p_starttime | |
| var time : timeval = timeval(tv_sec: 0, tv_usec: 0) | |
| gettimeofday(&time, nil) | |
| let currentTimeMilliseconds = Double(Int64(time.tv_sec) * 1000) + Double(time.tv_usec) / 1000.0 |
| call ((NSWindow *)[(NSArray *)[[NSApplication sharedApplication] windows] lastObject]).collectionBehavior = 1<<7|1<<8|1<<11 |
#Every Single Option Under The Sun
|
Variable |
Type |
| operator infix --> {} | |
| func --> (instance: Any, key: String) -> Any? { | |
| let mirror = reflect(instance) | |
| for index in 0 ..< mirror.count { | |
| let (childKey, childMirror) = mirror[index] | |
| if childKey == key { | |
| return childMirror.value | |
| } | |
| } |
| #!/bin/sh | |
| # ------------------------------------------------------------------------------ | |
| # SOME INFOS : fairly standard (debian) init script. | |
| # Note that node doesn't create a PID file (hence --make-pidfile) | |
| # has to be run in the background (hence --background) | |
| # and NOT as root (hence --chuid) | |
| # | |
| # MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit | |
| # INIT-INFO RULES http://wiki.debian.org/LSBInitScripts | |
| # INSTALL/REMOVE http://www.debian-administration.org/articles/28 |