Skip to content

Instantly share code, notes, and snippets.

@jordansissel
jordansissel / OUTPUT
Created May 27, 2021 06:30
xinput list devices showing pointer locations
% gcc main.c $(pkg-config --libs x11 xi --cflags) -o xinput-example
% ./xinput-example
Pointer id:2 at location 1011,756
@jordansissel
jordansissel / FZF Examples.md
Last active February 14, 2021 22:42
FZF usage examples

GKE

Get credentials for a given GKE cluster

gcloud container clusters get-credentials $(gcloud container clusters list --format json | jq -r '.[] | "\(.name) --zone \(.location)"' | fzf --height 10 --sync)

Kubernetes

@jordansissel
jordansissel / gist:3741723
Last active February 11, 2021 04:56
OpenSSL quick. (generate certs, run server/clients)
# Create a self-signed cert
openssl req -x509 -batch -nodes -newkey rsa:2048 -keyout lumberjack.key -out lumberjack.crt
# Create a self-signed with DNS SAN
openssl req -x509 -nodes -new -subj "/CN=localhost" -addext "subjectAltName = DNS:localhost" -newkey rsa:2048 -keyout
/tmp/server.key -out /tmp/server.crt
@jordansissel
jordansissel / foo.md
Last active February 6, 2021 22:08
logstash message format

logstash json format

{
  "message"    => "hello world",
  "@version"   => "1",
  "@timestamp" => "2014-04-22T23:03:14.111Z",
  "type"       => "stdin",
  "host"       => "hello.local"
}
@jordansissel
jordansissel / Setup.md
Last active February 2, 2021 21:13
Arch Linux setup

Partitioning

Partitioning is something I do once a year and never remember. Arch's docs have great reference guides, but I just want to move on with my life without reading too much docs. This aims to simplify my partitioning experience.

fdisk /dev/<disk device>

g # new gpt disk label
@jordansissel
jordansissel / Steps.md
Created September 24, 2020 06:35
Home Assistant on Raspberry Pi OS
@jordansissel
jordansissel / readme.md
Created July 11, 2012 07:03
logstash + you + me.

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 October 15, 2010 19:56
Simplest example of a masterless puppet invocation using module paths
include foo
@jordansissel
jordansissel / tshark-logstash.conf
Created February 7, 2015 05:56
Parsing tshark -V output with logstash
input { stdin { } }
output {
stdout {
#codec => rubydebug
codec => dots
}
elasticsearch {
protocol => http
@jordansissel
jordansissel / output
Created July 19, 2011 16:05
libxdo and WM_CLASS
% ./a.out $WINDOWID
Items: 22
Type: STRING
WM_CLASS[0]: terminator
WM_CLASS[1]: Terminator