Skip to content

Instantly share code, notes, and snippets.

View clee's full-sized avatar

Chris Lee clee

View GitHub Profile
@clee
clee / ssl.conf
Created April 10, 2014 19:09
nginx SSL configuration
ssl_session_cache shared:SSL:32m;
ssl_session_timeout 10m;
ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-RC4-SHA:HIGH:!MD5:!aNULL:!EDH;
ssl_prefer_server_ciphers on;
@clee
clee / keybase.md
Created April 13, 2014 20:38
Keybase proof

Keybase proof

I hereby claim:

  • I am clee on github.
  • I am clee (https://keybase.io/clee) on keybase.
  • I have a public key whose fingerprint is 32EF 25A2 BA27 0268 2C0F 0662 7A6B DC1F F1DD 2862

To claim this, I am signing this object:

@clee
clee / broken-cloud.log
Last active August 29, 2015 14:00
cloud-config user issue
Apr 23 07:31:02 localhost systemd[1]: Starting Load cloud-config from /usr/share/oem/cloud-config.yml...
Apr 23 07:31:02 localhost coreos-cloudinit[2929]: 2014/04/23 07:31:02 Fetching user-data from datasource of type "local-file"
Apr 23 07:31:02 localhost coreos-cloudinit[2929]: 2014/04/23 07:31:02 Parsing user-data as cloud-config
Apr 23 07:31:02 localhost coreos-cloudinit[2929]: 2014/04/23 07:31:02 Wrote /etc/oem-release to filesystem
Apr 23 07:31:02 localhost coreos-cloudinit[2929]: 2014/04/23 07:31:02 Wrote file /run/systemd/system/etcd.service.d/10-oem.conf to filesystem
Apr 23 07:31:02 localhost coreos-cloudinit[2929]: 2014/04/23 07:31:02 Writing unit ec2-ssh-key.service to filesystem
Apr 23 07:31:02 localhost coreos-cloudinit[2929]: 2014/04/23 07:31:02 Placed unit ec2-ssh-key.service at /run/systemd/system/ec2-ssh-key.service
Apr 23 07:31:02 localhost coreos-cloudinit[2929]: 2014/04/23 07:31:02 Enabling unit file /run/systemd/system/ec2-ssh-key.service
Apr 23 07:31:02 10-10-10-2 coreos-cloudinit[2929]
@clee
clee / JavaClassNameGenerator.clj
Last active August 29, 2015 14:01
Port of @airencracken's JavaClassNameGenerator into a language that actually runs on the JVM for maximum lulz
(def nonsense [
"Serializer"
"Listener"
"XML"
"Builder"
"Interface"
"Manager"
"Handler"
"Factory"
"Observer"
@clee
clee / ichat-unarchiver.rb
Created April 15, 2011 09:31
read from iChat conversation logs using MacRuby
#!/usr/bin/env macruby
framework 'Foundation'
framework 'AppKit'
class Person
def initWithCoder(decoder)
# empty implementation needed for ancient iChat conversations
end
end
@clee
clee / app-client.js
Last active September 30, 2015 23:58
EventSource demo code
$.ready(function() {
var source = new EventSource("/events");
source.addEventListener('data', function(e) {
$("#content").append(e.data + "\n");
}, false);
});
@clee
clee / free.d
Created August 21, 2012 05:15
script to trace invocations of 'free'
#!/usr/sbin/dtrace
pid$target::free:entry
{
printf("%s: %s\n", probefunc, copyinstr(arg0));
}
@clee
clee / parsejson.go
Last active December 9, 2015 03:08
parsing newznab results in go
package main
import (
"fmt"
"io/ioutil"
"encoding/json"
)
type NewznabAttr struct {
Name string
@clee
clee / tailpipe.go
Created August 20, 2013 22:10
tailpipe uses 'tail -f' to read a file, and spits out the result over EventSource to whoever's listening.
package main
import (
eventsource "github.com/msgehard/goEventSource"
"encoding/json"
"net/http"
"os/exec"
"flag"
"log"
// "fmt"
@clee
clee / form.html
Created October 21, 2013 21:21
DreamObjects snippets for DreamScape article
<form action="https://promethean.objects.dreamhost.com/" method="POST" enctype="multipart/form-data">
<input type="hidden" name="key" value="uploads/${filename}">
<input type="hidden" name="AWSAccessKeyId" value="nr-q3_Rsprv94CdsuEpI">
<input type="hidden" name="acl" value="private">
<input type="hidden" name="success_action_redirect" value="http://c133.org/tmp/dho-success.html">
<input type="hidden" name="policy" value="eyJleHBpcmF0aW9uIjogIjIwMTUtMDEtMDFUMDA6MDA6MDBaIiwKICAiY29uZGl0aW9ucyI6IFsKICAgIHsiYnVja2V0IjogImNsZWUifSwKICAgIFsic3RhcnRzLXdpdGgiLCAiJGtleSIsICJ1cGxvYWRzLyJdLAogICAgeyJhY2wiOiAicHJpdmF0ZSJ9LAogICAgeyJzdWNjZXNzX2FjdGlvbl9yZWRpcmVjdCI6ICJodHRwOi8vYzEzMy5vcmcvdG1wL2Roby1zdWNjZXNzLmh0bWwifSwKICAgIFsic3RhcnRzLXdpdGgiLCAiJENvbnRlbnQtVHlwZSIsICIiXQogIF0KfQo=">
<input type="hidden" name="signature" value="zYcruOMR6qr7o6/Syj001g/trms=">
<input type="hidden" name="Content-Type" value="image/jpeg">
File to upload to DreamObjects: <input name="file" type="file">
<input type="submit"