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 | |
set -e | |
tile=pivotal-container-service-0.7.1-build.6.pivotal | |
om_username=some-username | |
om_password=some-password | |
om_target=https://1.2.3.4 | |
mkdir -p $HOME/tile-dl | |
cd $HOME/tile-dl |
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 ( | |
"math/rand" | |
"sort" | |
"testing" | |
) | |
func benchSort(size int, b *testing.B) { | |
b.StopTimer() |
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 ( | |
"log" | |
"math/rand" | |
"net/http" | |
_ "net/http/pprof" | |
"os" | |
"os/signal" | |
"runtime/debug" |
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
b github.com/cloudfoundry/diodes.(*OneToOne).TryNext | |
c | |
p d.readIndex | |
p d.writeIndex | |
q | |
n |
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
// This program atomically increments two unit64 values and prints them out | |
// periodically. | |
// | |
// The objective is to capture the same data `stat()` is providing by | |
// instrumenting calls to `read()` and `write()`. | |
package main | |
import ( | |
"log" | |
"sync/atomic" |
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 ( | |
"net" | |
"os" | |
) | |
const sock = "/tmp/test.sock" | |
func main() { |
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
type lock struct { | |
l uint32 | |
} | |
func (l *lock) Lock() { | |
for { | |
if atomic.CompareAndSwapUint32(&l.l, 0, 1) { | |
return | |
} | |
} |
Get an invite to the gopher's slack. It is a great resource for just asking questions or discussing various topics you might be interested in.
For Pivots there is also #gophers and #gopher-den-community slack channels.