- Github Account
- https://github.com
- Git Client
- https://www.sourcetreeapp.com
- Editor (VSCode)
- https://code.visualstudio.com
- Jekyll
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
| # https://unix.stackexchange.com/questions/222750/sudo-yum-repolist-show-repo-not-in-etc-yum-repo-d | |
| yum repolist | |
| yum repoinfo ius | |
| # Repos are either defined via .repo files in /etc/yum.repos.d or via plugins, which are usually defined via files in /etc/yum/pluginconf.d | |
| ls -la /etc/yum.repos.d | |
| ls -la /etc/yum/pluginconf.d | |
| # If you run yum repolist --noplugins does your repo in question still show up? |
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
| # Poll for various system stats for monitoring system | |
| # Just copy and paste the commands into a bash prompt | |
| # Use Ctrl-C to exit the polling | |
| # Simple Example (CPU/Load/Memory) | |
| # Settings | |
| INTERVAL_DURATION="5" # seconds to average across | |
| TIME_PAD=' ' |
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
| # convert openssl to ssh key | |
| PUB_KEY=$(cat <<KEY_DETAILS | |
| ---- BEGIN SSH2 PUBLIC KEY ---- | |
| Comment: "my_comment_or_username_here" | |
| AAAAB3NzaC1yc2EAAAADAQABAAABAQC14HPz8nY48W4gxlxDxXy6RDEO2msaOiO38SzoWr | |
| CT+3dz1TmT1nHb/UCeQ3iPFV+th9Rnq2Zrh2B4/kGQTyEotsa+1lnG8/3rL8QZZ7VVw0Ee | |
| 3bys8O0+jRUeTH1wljGpL7KzlCrfSCRqMXqTQm7Lg+WM0FUqSJX9iuzue45XtHonQnKdAX | |
| bsQoMBrCsbwv1qfiTHW1LYJX1fAuoHeVUDQKWfABLsSiixkEnATut36w/G1AW0RgTN2K+4 | |
| pJ3NIPWdsauzcVl+kLnFrRbGMUtZrOCAFv2sC7/6B5L5oRSEoYZKvVnIUOvhr6zY1BagX0 | |
| igFD6DEmLVKsXOZ8cLuUb3 |
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
| # Checking for Postfix Configs | |
| which sendmail | |
| ls -la /usr/sbin/sendmail | |
| ls -la /etc/alternatives/mta | |
| ls -la /usr/sbin/sendmail.postfix | |
| cat /etc/postfix/main.cf | grep relayhost | |
| # Install any necessary dependencies for sasl authentication (debian) | |
| apt-get install libsasl2-2 libsasl2-modules |
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
| # rsync with sudo | |
| rsync -av \ | |
| --rsync-path="sudo -u www-data rsync" \ | |
| -e 'ssh -o StrictHostKeyChecking=no' \ | |
| path_to_local_data/ user_name@example.com:/var/www/ | |
| # If you wanted to build an exclusion list from a list of files in a directory | |
| # This was useful when trying to sync a list of files but exclude a list of default installed | |
| # so that the destination only contained the differences of what was added that wasn't a part |
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
| # When you SSH into a server for the first time it prompts you if you trust the remote server's host key | |
| # To validate that they key you received is the same as the server you just logged into you can check | |
| # the fingerprint of the host key on the remote server itself. | |
| # Output fingerprint of system's host key | |
| ssh-keygen -l -f /etc/ssh/ssh_host_ecdsa_key.pub | |
| # You can fingerprint both the private and public key from a file | |
| # They should both produce the same fingerprint value. | |
| ssh-keygen -l -f ~/.ssh/id_ed25519.pub |
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
| # Heroku Postgres spins up instances that could be using self-signed certificates | |
| # You can view the details of a Postgres certificate to validate it | |
| openssl version | |
| # version 1.1.1+ supports postgres client connections | |
| # RHEL 8 / CentOS 8 should have a new enough version of openssl | |
| # macOS 11 uses LibreSSL and does not have support for this | |
| POSTGRES_HOST="my_postgres_db.lan" | |
| POSTGRES_PORT="5432" |
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
| # Run a command on a remote server using sudo to execute commands as root | |
| ssh -t ssh_user@ssh_host \ | |
| " | |
| sudo -u root -- sh -c \" | |
| whoami; | |
| cat ~/.ssh/authorized_keys | |
| \" | |
| " | |
| # The same command without the sudo wrapper |
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 HTTP Monitor Script | |
| URL="$1" | |
| INTERVAL="${2:-5}" | |
| if [ -z "$URL" ]; then | |
| echo "Usage: $0 <URL> [interval_seconds]" | |
| echo "Example: $0 https://google.com 2" | |
| exit 1 |
NewerOlder