Skip to content

Instantly share code, notes, and snippets.

View loa's full-sized avatar

Carl Loa Odin loa

  • NoneType AB
  • Stockholm
View GitHub Profile
@loa
loa / README.md
Last active April 23, 2024 17:26
Dual GPG Yubikey Setup

Dual GPG Yubikey Setup

If you follow this guide you will end up with an offline and online Yubikey. Use your online Yubikey for everyday life, signing/encryption etc. Offline key for signing keys for web-of-trust and replace lost online keys.

Awesome tools with PGP keys:

  • mozilla/sops dead-simple local encryption of sensitive files
  • popass.pw password manager for you and your team stored in git

Offline Yubikey

@loa
loa / stomp.sh
Created August 15, 2014 09:58
Netcat send to Stomp MQ
#!/bin/bash
# make sure netcat is installed
which nc || yum install -y nc
HOST="localhost"
PORT="61613"
LOGIN="guest"
PASSCODE="guest"
CHANNEL="stomp"
@loa
loa / semver.sh
Last active May 14, 2022 22:27
Bash Git SemVer Util
#!/bin/bash
# Author: Carl Loa Odin <carl.loa.odin@gmail.com>
# https://gist.github.com/loa/435da12af9494a112daf
test_res=0
function get_git_version() {
version=$(git describe)
if [ $? -eq 128 ]; then
# Return initial version incase no tags is found
@loa
loa / init.lua
Created August 29, 2019 10:48
Hammerspoon Window Columns
function moveWindowColumn(column, width)
local window = hs.window.focusedWindow()
local windowFrame = window:frame()
local screen = window:screen()
local screenFrame = screen:frame()
-- minimum 2 columns even on smaller displays
local numColumns = math.max(2, math.floor(screenFrame.w / 1100))
local remainder = screenFrame.w % numColumns
local columnWidth = math.floor(screenFrame.w / numColumns)
@loa
loa / README.md
Last active May 16, 2018 18:39
Kubernetes Fedora Single node
# https://kubernetes.io/docs/getting-started-guides/fedora/fedora_manual_config/
dnf install kubernetes

Keybase proof

I hereby claim:

  • I am loa on github.
  • I am loa (https://keybase.io/loa) on keybase.
  • I have a public key ASDGz8C-dFsDm6g3EBf6Ud28FTNS4LaaYd9OOr3MMeX2yAo

To claim this, I am signing this object:

@loa
loa / README.md
Last active January 9, 2018 11:48
Minikube host networking integration

Minikube host networking integration

Make it possible for your host to do dns lookups and reach internal pods and svcs in Minikube directly.

Networking

MacOS:

$ sudo route -n add 10.96.0.0/12 $(minikube ip) # svc
A (en) ALFA
B (en) BRAVO
C (en) CHARLIE
D (en) DELTA
E (en) ECHO
F (en) FOXTROT
G (en) GOLF
H (en) HOTEL
I (en) INDIA
J (en) JULIETT
@loa
loa / github_enterprise_jekyll_versions.md
Created March 13, 2017 14:27
GitHub Enterprise Jekyll Versions
<pre>
{% for dependency in site.github.versions %}
* {{ dependency[0] }}: {{ dependency[1] }}
{% endfor %}
</pre>
@loa
loa / yaml2json.sh
Created February 4, 2015 17:41
Yaml 2 Json
#!/bin/bash
python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)'