Skip to content

Instantly share code, notes, and snippets.

@jordansissel
jordansissel / comparison.md
Created Feb 11, 2012
DynamoDB is silly expensive
View comparison.md
@jordansissel
jordansissel / tutorial.md
Created May 15, 2011
Understanding Ruby's &:foo shortcut
View tutorial.md

Example usage of the '&:foo' syntax

# You can do this:
p ["hello", "world"].collect(&:upcase)

Output:

["HELLO", "WORLD"]

What just happeend? What does '&:upcase' mean?

@jordansissel
jordansissel / Steps.md
Created Sep 24, 2020
Home Assistant on Raspberry Pi OS
View Steps.md
@jordansissel
jordansissel / readme.md
Created Jul 11, 2012
logstash + you + me.
View readme.md

logstash needs full time love.

There are roughly 70 code contributors to the logstash project as of today. Many more exist as helpful folks on IRC and the mailling list. Others post awesome bug reports and feature requests. The community is simply awesome.

I've been working on logstash for about 2 years. All as a hobby - all part-time. About 70% of the current content (commits, 'git blame' lines, etc) are by me.

Unfortunately, I've never used logstash in production. (Embarrassing, I know!)

I'm embarrassed to answer user questions like "How do I optimize elasticsearch's storage?" with "Sorry, I've never used elasticsearch outside of my laptop."

@jordansissel
jordansissel / site.pp
Created Oct 15, 2010
Simplest example of a masterless puppet invocation using module paths
View site.pp
include foo
@jordansissel
jordansissel / tshark-logstash.conf
Created Feb 7, 2015
Parsing tshark -V output with logstash
View tshark-logstash.conf
input { stdin { } }
output {
stdout {
#codec => rubydebug
codec => dots
}
elasticsearch {
protocol => http
@jordansissel
jordansissel / 1-output.txt
Last active Dec 10, 2019
Convert curl|bash to an rpm with Docker and FPM
View 1-output.txt
% docker build -t rust .
...
# Export the image to tarball, which itself contains tarballs and a manifest.json
% docker save -o rust.tar rust
# Extract the last layer
# tar's -O flag extracts a single entry from the tarball.
# The file we want is the last "Layer" in the manifest.json
% tar -xf rust.tar -O $(tar -xf rust.tar -O manifest.json | jq -r '.[].Layers[-1]') > curlbash.tar
@jordansissel
jordansissel / main.go
Created Nov 21, 2019
go-elasticsearch w/ setting custom trusted CA certs and custom headers
View main.go
package main
import (
"encoding/base64"
"crypto/x509"
"fmt"
"github.com/elastic/go-elasticsearch/v8"
"io/ioutil"
"log"
"net/http"
@jordansissel
jordansissel / output
Created Jul 19, 2011
libxdo and WM_CLASS
View output
% ./a.out $WINDOWID
Items: 22
Type: STRING
WM_CLASS[0]: terminator
WM_CLASS[1]: Terminator
@jordansissel
jordansissel / keyboardcapture.go
Created Sep 26, 2017 — forked from obonyojimmy/keyboardcapture.go
go lang keyboard capture
View keyboardcapture.go
package main
import (
"fmt"
"syscall"
//~ "time"
"unsafe"
"golang.org/x/sys/windows"
)