I hereby claim:
- I am scriptautomate on github.
- I am cantevenio (https://keybase.io/cantevenio) on keybase.
- I have a public key ASD2q_ML80IcjJJlhOrHxOPUwiX1KbX6-71DZXIMlye-jwo
To claim this, I am signing this object:
| <# | |
| Tested On: | |
| PSVersion PSEdition | |
| --------- --------- | |
| 6.2.2 Core | |
| Prereqs: | |
| AWS DOCS | |
| - git clone https://github.com/awsdocs/aws-cloudformation-user-guide.git | |
| CFN Spec File |
| <# | |
| - BIOS of host machine also needs to be configured to allow hardware virtualization | |
| - Windows 10 Pro or otherwise is needed; Windows 10 Home Edition CANNOT get WSL | |
| - This gist WSLv2, but can use WSLv1 instead. I needed v1 as I run Windows 10 in a VM in Virtualbox. | |
| - WSLv2 has been giving me problems in Virtualbox 6.1, but WSLv1 works properly. | |
| - vbox has issues with the GUI settings when it comes to nested virtualization on certain systems, | |
| so run the following if needing to give a VM this enabled setting: | |
| VBoxManage modifyvm <vm-name> --nested-hw-virt on | |
| #> |
| <# | |
| Simple, nice bootstrap to get Windows 10 up-and-running with nice setup! | |
| - Installs chocolatey (choco) | |
| - Installs common software | |
| I highly recommend Windows Subsystem for Linux (WSL), also, which is covered in | |
| a separate gist. It also has a choco command for installing Docker Desktop after: | |
| - https://gist.github.com/ScriptAutomate/f94cd44dacd0f420fae65414e717212d | |
| #> |
| #!/usr/bin/env bash | |
| # By default, Manjaro seems to only have 2019.2.7 | |
| # Python 2 variant available for installation via pacman. | |
| # Following the install directions doesn't work as expected, for latest: | |
| # https://docs.saltstack.com/en/latest/topics/installation/arch.html | |
| cd ~/Downloads | |
| sudo pacman -S base-devel --noconfirm | |
| wget https://aur.archlinux.org/cgit/aur.git/snapshot/salt-py3.tar.gz | |
| tar xf salt-py3.tar.gz |
| #!/usr/bin/env bash | |
| # Wraps around GitHub CLI (gh): https://cli.github.com/ | |
| # Check all other open PRs that are working on | |
| # files being deleted by the target PR. | |
| # Usage: | |
| # ./gh-delete-auditor.sh <PR> | |
| # | |
| # Example: | |
| # ./gh-delete-auditor.sh 57645 |
I hereby claim:
To claim this, I am signing this object:
For those doomed to try reviewing a major amount of diffs in GitHub for a single PR:
ctrl+i. We want to be in the Console, which in Firefox is ctrl+shift+k.| AUTOMODULES=`grep -rn ".. automodule:: " doc/ | grep -v "_templates" | cut -d' ' -f3` | |
| for MODULE in $AUTOMODULES; do | |
| MODULE_FILE="$(echo $MODULE | sed 's:\.:\/:g').py" | |
| if [[ ! -f "$MODULE_FILE" ]]; then | |
| echo "$MODULE_FILE" | |
| echo "--------" | |
| echo "ERROR: Attempting to import $MODULE_FILE, which does not exist." | |
| fi | |
| done |
| """ | |
| Replace tool | |
| Source: https://superuser.com/questions/422459/substitution-in-text-file-without-regular-expressions | |
| """ | |
| import re | |
| import sys | |
| search_term = sys.argv[1] | |
| replace_term = sys.argv[2] | |
| target_file = sys.argv[3] |
| # This is tested/verified on Pop!_OS 20.04 and 20.10 | |
| # Older versions tested on Parrot OS 4.1.0 | |
| # This example state requires common:lookup:user value in a pillar file | |
| {% set user_name = salt['pillar.get']('common:lookup:user') %} | |
| # Prereqs recommended for building Python | |
| ## ref: https://github.com/pyenv/pyenv/wiki#suggested-build-environment | |
| ## Ubuntu/Debian/Mint (includes Pop!_OS, Kali, etc.) | |
| pyenv-prereq-pkgs: | |
| pkg.installed: |