Skip to content

Instantly share code, notes, and snippets.

Péter Szilágyi karalabe

Block or report user

Report or block karalabe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am karalabe on github.
  • I am karalabe (https://keybase.io/karalabe) on keybase.
  • I have a public key ASBWlGCQs65jLuHXFfGkRwvtVXsJg8r5Hgs1wjmwtxdueQo

To claim this, I am signing this object:

@karalabe
karalabe / bufio_repro.go
Created Jan 31, 2015
Repro to highlight the bufio.Copy requirements
View bufio_repro.go
package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os/exec"
)
@karalabe
karalabe / bufioext.go
Created Jan 28, 2015
Buffered concurrent copy
View bufioext.go
package bufioext
import (
"io"
"sync/atomic"
)
// Copy copies from src to dst until either EOF is reached on src or an error
// occurs. It returns the number of bytes copied and the first error encountered
// while copying, if any.
@karalabe
karalabe / cloud_appengine.go
Last active Aug 29, 2015
Simplified cloud context creation
View cloud_appengine.go
// Contains the App Engine specific cloud utility implementations.
// +build appengine
package cloud
import (
"net/http"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
@karalabe
karalabe / Dockerfile
Created Nov 7, 2014
Docker expose bug repro
View Dockerfile
FROM debian:7
EXPOSE \
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 \
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 \
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 \
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 \
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 \
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 \
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 \
@karalabe
karalabe / main.go
Last active Aug 29, 2015
Access Google services through service accounts in Go
View main.go
package main
import (
"code.google.com/p/goauth2/oauth/jwt"
"code.google.com/p/google-api-go-client/storage/v1beta2"
"fmt"
"log"
"regexp"
)
You can’t perform that action at this time.