1/03/2023
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
| # krun busybox whoami | |
| krun(){ | |
| local NAMESPACE=default | |
| local PRIVILEGED=false | |
| while getopts 'n:pu:' OPT; do | |
| case $OPT in | |
| n) NAMESPACE=$OPTARG | |
| ;; | |
| p) PRIVILEGED=true |
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
| #!/bin/bash | |
| # Simple script to change admin login timeout in pihole version 5.17 and up. | |
| # Note that some versions of pihole used 'loginpage.php' instead of 'login.php' | |
| # make the script executeable by typing: | |
| # chmod +x pihole-timeout.sh | |
| # run it by typing: | |
| # sudo ./pihole-timeout.sh | |
| # Check if user is using sudo or is root: | |
| if [[ $(/usr/bin/id -u) -ne 0 ]]; then |
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
| hs.hotkey.bind({"cmd", "alt", "ctrl"}, "v", function() | |
| -- Change your email | |
| local email = "firstname.lastname@sintef.no" | |
| local ciscoName = "Cisco AnyConnect Secure Mobility Client" | |
| local loginWindowName = "login" | |
| if hs.application.launchOrFocus(ciscoName) then | |
| local ciscoApplication = hs.application.get(ciscoName) | |
| local mainWindow = ciscoApplication:mainWindow() |
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
| $ # Use Live CD to boot | |
| $ sudo su # Switch to root | |
| $ fdisk -l # Get names of root, boot & EFI partition names. you can also use blkid | |
| $ # http://dadadom.de/2020/04/11/fix-fedora-uefi-boot-with-encrypted-partitions/ | |
| $ udiskctl unlock -b /dev/nvme0n1p6 # unlock root luks partition | |
| $ mount /dev/mapper/fedora_fedora-root /mnt # mount root partition | |
| $ mount /dev/mapper/fedora_fedora-var /mnt/var | |
| $ mount /dev/nvme0n1p5 /mnt/boot # mount boot partition |
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 | |
| ## Copyright (C) 2017, Oleksandr Kucherenko | |
| ## Last revisit: 2017-09-29 | |
| # For help: | |
| # ./versionip.sh --help | |
| # For developer / references: | |
| # https://ryanstutorials.net/bash-scripting-tutorial/bash-functions.php | |
| # http://tldp.org/LDP/abs/html/comparison-ops.html |
This is the gist promised in our our KubeCon EU 2021 talk.
Go to https://github.com/kingdonb/kccnceu2021 for the full experience! 💖🤩
- Check out the
mainbranch for the full talk experience (warts and all) - Check out the
presentbranch for the solutions according to the presenter - Check out the
terminalbranch for risky root shell fun - Check out the
featuresbranch for additional features as we incorporate them throughout the week based on your suggestions!