(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
history | awk '{CMD[$2]++;count++;}END { for (a in CMD) print CMD[a] "" CMD[a]/count*100"% "a;}' | grep -v "./" | column -c3 -s "" -t | sort -nr | nl | head -n 30 |
// Steal from http://irace.me/swift-profiling | |
xcodebuild -workspace App.xcworkspace -scheme App clean build OTHER_SWIFT_FLAGS="-Xfrontend -debug-time-function-bodies" | grep .[0-9]ms | grep -v ^0.[0-9]ms | sort -nr > culprits.txt |
// Origin from http://mjtsai.com/blog/2016/05/24/swift-tuples-arent-equatable/ | |
extension SequenceType { | |
/// Returns `true` iff an element in `self` satisfies `predicate`. | |
@warn_unused_result | |
public func contains(@noescape predicate: (Self.Generator.Element) throws -> Bool) rethrows -> Bool | |
} |
#!/bin/bash | |
# | |
# 通过对比 ping 响应时间,找到本机最快的上传ip | |
# Travis@fir.im | |
# | |
function refresh_host() | |
{ | |
IP="$1" | |
UPLOAD_HOST="upload.qiniu.com" |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#import <objc/runtime.h> | |
#import <objc/message.h> | |
#import <libkern/OSAtomic.h> | |
#import <pthread.h> | |
#define ITERATIONS (1024*1024*32) | |
- (void)testLock | |
{ | |
double then, now; | |
unsigned int i, count; |
<script> | |
var=(!-[1,]), | |
if (var) | |
{ | |
alert(This is not IE explorer.) | |
}else{ | |
alert(This is IE explorer.) | |
} | |
</script> |