| #!/bin/bash | |
| # Author: Jan Keith Darunday <[email protected]> | |
| # Description: A shell script that switches to the next available Pulseaudio output device/sink | |
| # Note: This uses pactl instead of pacmd since pacmd is not available in pipewire | |
| function get_current_sink() { | |
| pactl info | sed -En 's/Default Sink: (.*)/\1/p' | |
| } | |
| SINKS=$(pactl list short sinks | grep -v easyeffects) |
| #!/bin/bash | |
| ##### | |
| # | |
| # This bash script installs latest docker-ce, kubectl and helm software on Ubuntu 20.4 Linux AMD64 | |
| # | |
| ##### | |
| TMP_DIR="$(mktemp -d)" | |
| ######################## |
- Create your kind cluster (suit yourself https://kind.sigs.k8s.io/docs/user/configuration/)
cat <<EOF | kind create cluster --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
KIND runs Kubernetes cluster in Docker, and leverages Docker networking for all the network features: port mapping, IPv6, containers connectivity, etc.
KIND uses a docker user defined network.
It creates a bridge named kind
| ### This file is intended to be sourced from ~/.bashrc ### | |
| # quickly switch between AWS profiles with auto-completion | |
| # uses https://github.com/Nike-Inc/gimme-aws-creds to obtain credentials | |
| # if using static credentials, just comment out lines 13-15 | |
| awsp() { | |
| if [[ -n $1 ]] ; then | |
| # validate input | |
| grep -q -w "\[profile ${1}\]" ~/.aws/config || { echo "No such profile $1"; return 1; } |
| #!/usr/bin/env python | |
| # | |
| # Scrape Doh provider URLs from Curl's DNS-over-HTTPS wiki (https://raw.githubusercontent.com/wiki/curl/curl/DNS-over-HTTPS). | |
| # | |
| # Example usage: ./scrape_doh_providers.py '"{} - {}".format(o["url"], o["name"])' | |
| # | |
| import argparse | |
| import re | |
| import urllib.request |
| # vim: filetype=i3 | |
| # File originally by Luke Smith <https://lukesmith.xyz> | |
| # This config file will use environmental variables such as $BROWSER and $TERMINAL. | |
| # You can set these variables in ~/.profile or ~/.bash_profile if you have it as below: | |
| # | |
| # export FILE="ranger" | |
| # export TERMINAL="st" | |
| # #---Basic Definitions---# # |
This tutorial was written using Red Hat Fedora 30 but may be similar on other distros.
You should have an eth0, but if you $ ifconcig -a and don't see it, you should do $ nmcli device status to determine which device is connected to your wifi/ethernet.
$ sudo ip link add macvlan1 link eth0 type macvlan mode bridge
$ sudo ip link add macvlan2 link eth0 type macvlan mode bridge
$ sudo ip netns add net1If you're hacking on your Gemfile and using Docker, you know the pain of having the bundle install command run after you've added or removed a gem. Using docker-compose you could mount a volume and stage your gems there, but this adds additional complexity and doesn't always really solve the problem.
Enter this imperfect solution:
What if we installed every gem into it's own Docker layer which would be happily cached for us?
gem-inject-docker does just that. It takes the list of gems used by your app via bundle list and transforms it into a list of RUN gem install <your gem> -v <gem version> statements and injects them into the Dockerfile at a point of your choosing.