foo
bar
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. |
# 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 |
#!/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/\</')" |
- 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 }}" |
module Main exposing (..) | |
import Html exposing (div, text) | |
import List | |
import Tuple | |
main = | |
Html.beginnerProgram { model = [], view = view, update = (\_ -> \x -> x) } |
- 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"}" |
./oom-protector.sh <executable> <options> |
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. |
Generate a mapping of AWS regions and availability zones for use in cloudformation |