Skip to content

Instantly share code, notes, and snippets.

View cmars's full-sized avatar

Casey Marshall cmars

View GitHub Profile
@cmars
cmars / CFSSL.md
Last active August 10, 2016 20:47
Loneliest keysigning party ever
@cmars
cmars / show_cookies.py
Created April 20, 2016 19:22
Show ~/.go-cookies content without compromising authorization tokens
#!/usr/bin/env python3
import base64
import json
import os
import sys
if __name__ == '__main__':
if sys.argv[1:]:
filename = sys.argv[1]
package bench
import (
"crypto/tls"
"crypto/x509"
"testing"
"time"
"github.com/juju/juju/cert"
gc "gopkg.in/check.v1"
@cmars
cmars / README.md
Last active January 19, 2016 18:47
Juju sockets proof-of-concept

This is a proof of concept demonstrating local socket communication with Juju using generally available command line utilities and commands from a remote shell via 'juju ssh' or 'juju run'.

@cmars
cmars / main.go
Last active August 29, 2015 14:26
dependency engine example
package main
import (
"fmt"
"os"
"time"
"github.com/juju/juju/worker"
"github.com/juju/juju/worker/dependency"
)
package main
import (
"crypto/rand"
"fmt"
"code.google.com/p/go.crypto/nacl/box"
)
type PublicKey struct {
package main
import (
"bytes"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/sha256"
"flag"
"fmt"
@cmars
cmars / juju-nuke
Created January 7, 2014 20:21
This "juju nuke" plugin will not only destroy-service, it will also destroy-machine --force all machines running units of that service. Normally, juju does not reuse machines when destroying and redeploying services. This is useful when you're debugging on an OpenStack or AWS and tired of leaking instances when redeploying. This script is called…
#!/usr/bin/env python
import json
import os
import sys
from subprocess import Popen, PIPE
def die(msg):
print >>sys.stderr, msg