I hereby claim:
- I am jamesmcdonald on github.
- I am jamesmcdonald (https://keybase.io/jamesmcdonald) on keybase.
- I have a public key ASCKs__uF7nQGcY936n3Vctl38hk13tHmwdovM9vabhUVgo
To claim this, I am signing this object:
| - name: Set keybindings variable | |
| tags: | |
| - gnome | |
| set_fact: | |
| keybindings: | |
| - name: binding | |
| value: "'<Super>p'" | |
| - name: command | |
| value: "'passmenu'" | |
| - name: name |
| Sat May 2 13:55:37 UTC 2020 |
| function cerebro() { | |
| docker network inspect cerebro >/dev/null 2>&1 | |
| if [[ $? -ne 0 ]]; then | |
| echo -n "Creating cerebro network: " | |
| docker network create cerebro | |
| if [[ $? -ne 0 ]]; then | |
| echo "Failed to create network, aborting" >&2 | |
| return | |
| fi | |
| fi |
| # kn <context> [namespace] lets you quickly change kubectl's context and | |
| # optionally namespace. Tab completion is supported for both. If you just want | |
| # to change namespace in the same context, you can use context ".". | |
| function kn() { | |
| local context=$1 | |
| local namespace=$2 | |
| if [[ -z "$context" ]]; then | |
| echo "usage: kn <context> [namespace]" >&2 | |
| return 1 |
| function kn() { | |
| local context=$1 | |
| shift | |
| local namespace=$1 | |
| shift | |
| if [[ -z "$context" ]]; then | |
| echo "usage: kn <context> [namespace]" >&2 | |
| return 1 | |
| fi | |
| if ! kubectl config get-contexts $context >/dev/null 2>&1; then |
| # This should go in /etc/udev/rules.d | |
| KERNEL=="card0", SUBSYSTEM=="drm", ACTION=="change", RUN+="/usr/local/bin/monitorswitch.sh" |
| #!/usr/bin/env python3 | |
| """Read a stream of one-per-line json events and print them in a more human-readable format""" | |
| import json | |
| import sys | |
| import string | |
| import argparse | |
| class SkipFormatter(string.Formatter): | |
| """A string.Formatter that returns '-' for missing fields""" |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env python | |
| """ | |
| Wrap i3status to add things to your i3bar | |
| You need to have dbus-python installed. | |
| Right now this will prepend | |
| * Spotify status that looks like "Artist > Song". | |
| The > will be replaced with an _ if Spotify is paused. |
| // Overcomplicated "healthy" metric generator | |
| package main | |
| import ( | |
| "fmt" | |
| "math/rand" | |
| "net/http" | |
| "os" | |
| "strconv" | |
| "time" |