This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This switches between the laptop monitor ($intern) when undocked and a two monitor setup when docked ($extern right of $intern). | |
ENV{ID_VENDOR_ID}, ENV{ID_MODEL_ID}, x_user and intern need to be set. | |
Based on the Arch wiki, StackExchange and Google. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# General. | |
xdg-mime default transmission.desktop x-scheme-handler/magnet | |
xdg-mime default transmission.desktop application/x-bittorrent | |
# GNOME. | |
gconftool-2 -t string -s /desktop/gnome/url-handlers/magnet/command "/usr/bin/transmission-remote -a '%s'" | |
gconftool-2 -t bool -s /desktop/gnome/url-handlers/magnet/needs_terminal false | |
gconftool-2 -t bool -s /desktop/gnome/url-handlers/magnet/enabled true | |
# https://wiki.archlinux.org/index.php/default_applications |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# USAGE: drawioxml2html.sh diagram.xml >diagram.html | |
# html encoding from https://stackoverflow.com/questions/12873682/#answer-12873723 | |
diag="$(sed 's,.*<\(diagram [^>]*\)>\(.*\)<\(/diagram\)>.*,\1FOO\2BAR\3,g' <"$1"|\ | |
sed 's/&/\&/g; s/</\</g; s/>/\>/g; s/"/\"/g; s/'"'"'/\'/g'|\ | |
sed 's/&/\\&/g; s/FOO/\>/; s/BAR/\</')" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- set_fact: | |
tun_pid_file: ... | |
- name: set up a tunnel to tiller | |
shell: | | |
tiller_pod="$(kubectl get pod -l app=helm,name=tiller --namespace kube-system -o name|cut -d/ -f2)" | |
nohup kubectl port-forward "$tiller_pod" 44134:44134 --namespace kube-system </dev/null >/dev/null 2>&1 & | |
echo "$!" >{{ tun_pid_file|quote }} | |
creates: "{{ tun_pid_file }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main exposing (..) | |
import Html exposing (div, text) | |
import List | |
import Tuple | |
main = | |
Html.beginnerProgram { model = [], view = view, update = (\_ -> \x -> x) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- set_fact: | |
prefix: foo/bar | |
- name: delete aws secretsmanager secrets by name prefix | |
shell: | | |
set -eo pipefail | |
shopt -s inherit_errexit 2>/dev/null || true | |
declare -a opt page_secrets secrets | |
while [[ "$next_token" != null ]]; do | |
read -ra opt <<<"${next_token:+--next-token "$next_token"}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./oom-protector.sh <executable> <options> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Wait for kubernetes deployments to complete. | |
Two variants - s1.sh and s2.sh. | |
Usage: | |
./sX.sh | |
./sX.sh some-namespace | |
Both variants make just one pass through the list of deployments, so if another | |
deployment is started while the script is running, the result may not be | |
correct. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Generate a mapping of AWS regions and availability zones for use in cloudformation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Generate password hash for Hippo CMS. | |
# Requires bash and coreutils, slow. | |
./hippohash.sh <password> [salt] | |
# Requires python, fast. | |
./hippohash.py <password> [salt] |
OlderNewer