Skip to content

Instantly share code, notes, and snippets.

View jasonkeene's full-sized avatar
:shipit:

Jason Keene jasonkeene

:shipit:
View GitHub Profile
package main
import "fmt"
func main() {
func() {
goto HELL
}()
return
@jasonkeene
jasonkeene / go-for-the-dynamic-programmer.md
Last active March 23, 2017 18:39
Go for the Dynamic Programmer

Go for the Dynamic Programmer

  • Introduction
    • I love dynamic languages
    • You will hate the compiler (at first)
    • Goals for the series
  • C vs Go vs Python/Ruby/JavaScript
    • Compilation Speed
    • Runtime Speed
  • Startup Time
resource "remote_data" current_datetime {
count = "${var.size}"
taint = "is_end_of_the_world"
create = "date +%y%m%d%H%M"
shell = true
}
resource "openstack_compute_instance_v2" myinstance {
count = "${var.size}"
@jasonkeene
jasonkeene / bootstrap.md
Last active July 20, 2016 22:32
Bootstrap your involvement in the CO Go community!

Community Discussion

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.

type lock struct {
l uint32
}
func (l *lock) Lock() {
for {
if atomic.CompareAndSwapUint32(&l.l, 0, 1) {
return
}
}
package main
import (
"net"
"os"
)
const sock = "/tmp/test.sock"
func main() {
@jasonkeene
jasonkeene / java-concurrency-in-practice-notes.md
Last active September 25, 2022 23:15
Java Concurrency In Practice

Preface

  • Read on the train, no notes.

Chapter 1 - Introduction

  • Read on the train, no notes. Basic introduction to concurrency concepts.

Chapter 2 - Thread Safety

@jasonkeene
jasonkeene / trace.go
Created May 14, 2017 16:26
A demo program to experiment with tracing Go programs on linux.
// 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"
@jasonkeene
jasonkeene / diode_heads.dlv
Created May 15, 2017 04:44
Query a metron process for the read/write head delta.
b github.com/cloudfoundry/diodes.(*OneToOne).TryNext
c
p d.readIndex
p d.writeIndex
q
n