Skip to content

Instantly share code, notes, and snippets.

@jordansissel
jordansissel / OUTPUT
Created May 27, 2021
xinput list devices showing pointer locations
View OUTPUT
% gcc main.c $(pkg-config --libs x11 xi --cflags) -o xinput-example
% ./xinput-example
Pointer id:2 at location 1011,756
@jordansissel
jordansissel / Setup.md
Last active Feb 2, 2021
Arch Linux setup
View Setup.md

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 Sep 24, 2020
Home Assistant on Raspberry Pi OS
View Steps.md
@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"
View example
$ test1=foo
$ set -a
$ test2=foo
$ test3=foo
$ set +a
$ env | grep test
test2=foo
test3=foo
@jordansissel
jordansissel / FZF Examples.md
Last active Feb 14, 2021
FZF usage examples
View FZF Examples.md

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 / zoom.md
Last active Dec 17, 2020
Zoom on Linux notes
View zoom.md

In a zoom?

xdotool search --name "Zoom Meeting ID:"

This will exit non-zero if no meeting matching this name is found. "Zoom Meeting ID:"

This window exists regardless of sharing or not sharing, in my tests.

@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 / sincos.elm
Created Jan 16, 2018
Playing with Elm and SVG.
View sincos.elm
import Svg exposing (..)
import Svg.Attributes exposing (..)
import List
cycles = 2
yScale = 50
lineThickness = 20
i = List.range 0 (cycles * 360)
View Main.java
public class Main {
public static void main(String[] args) {
X x = new X();
Long value = 500L;
if (args.length != 1) {
System.out.println("Usage: Main <iterations>");
System.exit(1);
}