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 | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| # Filter cheatsheet | |
| # https://gist.github.com/jonlabelle/0f8ec20c2474084325a89bc5362008a7 | |
| PASSWORD="password" | |
| BN="dc=acme,dc=com" | |
| DN="CN=Joe Smith,OU=Fabrication,OU=Los Angeles,OU=CA,OU=Users,${BN}" |
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
| # Custom application *.desktop files are stored here | |
| ${HOME}/.local/share/applications | |
| # Default home dir paths in kde | |
| ${HOME}/.local/bin:${HOME}/bin:${HOME}/.local/bin:${HOME}/bin |
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/bash | |
| if [[ $(whoami) != "root" ]]; then | |
| echo "You must be root to run this script." | |
| exit 1 | |
| fi | |
| echo "----------------------" | |
| echo "Existing settings" | |
| echo "----------------------" |
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
| { | |
| "venv" : "/path/to/venv", | |
| "exclude": [ | |
| "**/node_modules", | |
| "**/__pycache__", | |
| "**/*.zip" | |
| ], | |
| "include": [ | |
| "src" | |
| ] |
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 | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| key="/root/custom_mok.priv" | |
| der="/root/custom_mok.der" | |
| if [[ $(whoami) != "root" ]]; then | |
| echo "This script must be run as root" | |
| exit 1 |
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 | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| usage() { | |
| echo "Usage: $0 <enable|disable>" | |
| exit 1 | |
| } | |
| action="${1:-}" |
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 python3 | |
| # -*- coding: utf-8 -*- | |
| """Globbing.""" | |
| from pathlib import Path | |
| def _iterfiles(path:Path): | |
| for i in path.iterdir(): | |
| if i.is_dir(): | |
| yield from _iterfiles(i) | |
| else: |
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
| # Do not pass go, reboot now | |
| echo 1 > /proc/sys/kernel/sysrq | |
| echo b > /proc/sysrq-trigger |
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 | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| awk -F\' '/menuentry / {print $2}' /boot/grub/grub.cfg |
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 python3 | |
| # -*- coding: utf-8 -*- | |
| """Print out slack access logs ordered by number of instances and first access / latest access from IP.""" | |
| import csv | |
| import sys | |
| from collections import defaultdict | |
| from datetime import datetime | |
| from pathlib import Path | |
| FILE = Path("./access_logs.csv") |