$ go test --cover
2015/12/04 14:37:37 http: TLS handshake error from 127.0.0.1:63573: remote error: bad certificate
--- FAIL: TestTransportConnectionCloseOnRequestDisableKeepAlive_h2 (0.00s)
transport_test.go:282: Get https://127.0.0.1:63572: x509: certificate signed by unknown authority
FAIL
coverage: 77.3% of statements
exit status 1
FAIL net/http 22.478s
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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
func fillUp(id int) chan string { | |
content := make(chan 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
diff --git a/src/net/http/client_test.go b/src/net/http/client_test.go | |
index e59ab2c..ba0beff 100644 | |
--- a/src/net/http/client_test.go | |
+++ b/src/net/http/client_test.go | |
@@ -65,12 +65,15 @@ func (w chanWriter) Write(p []byte) (n int, err error) { | |
return len(p), nil | |
} | |
-func TestClient(t *testing.T) { | |
+func TestClient_h1(t *testing.T) { testClient(t, false) } |
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
package main | |
import ( | |
"fmt" | |
"os" | |
) | |
func cwd() string { | |
wd, _ := os.Getwd() | |
return wd |
I hereby claim:
- I am odeke-em on github.
- I am emmtodeke (https://keybase.io/emmtodeke) on keybase.
- I have a public key whose fingerprint is B4C1 3DEC 5C12 70DF ECFA 4F93 638B AA7D 15E5 9951
To claim this, I am signing this object:
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 crypto = require('crypto'); | |
function hexSha256ify(password) { | |
var sha256sum = crypto.createHash('sha256'); | |
sha256sum.update(password + ''); | |
return sha256sum.digest('hex'); | |
} | |
function createNewUser(data) { | |
data = data || {}; |
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
#include <stdio.h> | |
int main() { | |
FILE *ifp = fopen(__FILE__, "r"); | |
if (ifp == NULL) | |
return -1; | |
char c; | |
while ((c = getc(ifp)) != EOF) putchar(c); | |
fclose(ifp); | |
return 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
#!/bin/bash | |
target_name="foo" # Remember to set your name here | |
target_email="[email protected]" # Set the new email here | |
git filter-branch --commit-filter 'if [ "$GIT_AUTHOR_NAME" = $target_name ]; | |
then export GIT_AUTHOR_EMAIL=$target_email; | |
fi; git commit-tree "$@"' |
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
var bucket = new AWS.S3({params: {Bucket: 'foo'}}); | |
var callback = function(err, data) { if (err) console.log(err); else console.log(data);} | |
// Objects since 2015-02-23 | |
bucket.listObjects({Prefix: '2015-02', Marker: '2015-02-23-00:00:00'}, callback); | |
// Objects after 4:00 p.m on 2015-02-23 | |
bucket.listObjects({Prefix: '2015-02-23', Marker: '2015-02-23-16:00:00'}, callback); |
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
#include <stdio.h> | |
#include <string.h> | |
int main() { | |
char *lang = "c_language"; | |
size_t len = strlen(lang); | |
size_t i; | |
for (i = 0; i < len; ++i) { | |
const char c = lang[i]; |