Skip to content

Instantly share code, notes, and snippets.

View jordanorelli's full-sized avatar
🎴

Jordan Orelli jordanorelli

🎴
View GitHub Profile
#!/usr/bin/env ruby
# workaround-upstart-snafu
#
# When lied to about the behavior of a job’s main process wrt. forking with the
# “expect” stanza, Upstart can get into a confused state where it’s tracking a
# nonexistent pid.
#
# This hack creates new short-lived processes until one gets the pid in
# question, then has its parent die so that it’s going to get reaped by pid 1
# ------------------------------------------------------------------------------
# Cluster config
# ------------------------------------------------------------------------------
default_network: {
name: "default"
servers: ["localhost:9991"]
ssl_ca: "/etc/pki/logstash/lumberjack_development.crt"
timeout: 180
}
# Server
redis_version:2.6.14
redis_git_sha1:00000000
redis_git_dirty:0
redis_mode:standalone
os:Linux 2.6.32-431.11.2.el6.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.4.6
process_id:31144
<?php
$thing = [
"x" => 1,
"y" => 2
];
var_dump($thing);
$json = json_encode($thing);
echo $json . "\n";
package main
import (
"fmt"
"time"
)
type Bomb struct {
profile *Connection
origin *System
cols, err := a_rows.Columns()
if err != nil {
bail(1, "can't get columns: %v", err)
}
fmt.Println(cols)
for a_rows.Next() {
fml, vals := make([]interface{}, len(cols)), make([]interface{}, len(cols))
for i := 0; i < len(cols); i++ {
fml[i] = &vals[i] // so fml is an interface{} that contains a *interface{}
// yep. this is the fucking worst.
@jordanorelli
jordanorelli / keybase.md
Created December 1, 2014 22:17
keybase.md

Keybase proof

I hereby claim:

  • I am jordanorelli on github.
  • I am jorelli (https://keybase.io/jorelli) on keybase.
  • I have a public key whose fingerprint is FD44 87EA 9122 8349 2AEB E8B8 B157 1119 10E6 3FF8

To claim this, I am signing this object:

package main
import (
"code.google.com/p/go.crypto/ssh"
"code.google.com/p/go.crypto/ssh/terminal"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
package main
import (
"code.google.com/p/go.crypto/ssh"
"code.google.com/p/go.crypto/ssh/terminal"
"flag"
"fmt"
"io"
"io/ioutil"
"log"