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
$ go run client.go /tmp/uds-sample-server.sock 0123456789abcdefghijklmnopqrstuvwxyz | |
# サーバーへの送信データ | |
client.go:28: send: 0123456789abcdefghijklmnopqrstuvwxyz | |
# サーバーからの受信データ | |
client.go:44: receive: 0123456789 | |
client.go:44: receive: abcdefghij | |
client.go:44: receive: klmnopqrst | |
client.go:44: receive: uvwxyz0123 | |
client.go:44: receive: 456789abcd | |
client.go:44: receive: efghijklmn |
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
$ uname -a | |
Darwin xxxxxx 15.6.0 Darwin Kernel Version 15.6.0: Mon Aug 29 20:21:34 PDT 2016; root:xnu-3248.60.11~1/RELEASE_X86_64 x86_64 | |
$ node -v | |
v6.7.0 | |
$ serverless -v | |
1.0.2 | |
$ cat /usr/local/lib/node_modules/serverless/node_modules/glob/package.json | grep '"version"' | |
"version": "7.1.0" |
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
[ $A -nt $B]: | |
1: $A and $B do not exist ($A=, $B=) | |
0: $A exists, $B does not exist ($A=2016-08-19 14:43:18.214264727 +0900, $B=) | |
1: $A dose not exist. $B exists ($A=, $B=2016-08-19 14:43:18.214264727 +0900) | |
1: $A is older than $B ($A=2016-08-19 14:43:18.218264799 +0900, $B=2016-08-19 14:43:19.218282884 +0900) | |
1: $A is older than $B(0.1sec) ($A=2016-08-19 14:43:19.222282957 +0900, $B=2016-08-19 14:43:19.322284769 +0900) | |
0: $A is newer than $B ($A=2016-08-19 14:43:20.326302931 +0900, $B=2016-08-19 14:43:19.326284841 +0900) | |
1: $A is newer than $B(0.1sec) ($A=2016-08-19 14:43:20.434304881 +0900, $B=2016-08-19 14:43:20.330303003 +0900) | |
1: $A and $B is same timestamp ($A=2016-08-19 14:43:20.434304881 +0900, $B=2016-08-19 14:43:20.434304881 +0900) | |
[ $A -ot $B]: |
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 NSData { | |
func s3etag(minimumPartSize: UInt64 = 5 * 1024 * 1024) -> String { | |
func md5digest(data: NSData) -> NSData { | |
let digestLength = Int(CC_MD5_DIGEST_LENGTH) | |
let md5Buffer = UnsafeMutablePointer<CUnsignedChar>.alloc(digestLength) | |
CC_MD5(data.bytes, CC_LONG(data.length), md5Buffer) | |
return NSMutableData(bytesNoCopy: md5Buffer, length: digestLength) | |
} | |
func md5hexdigext(data: NSData) -> 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
% brew install ffmpeg |