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 | |
| cd /boot || exit 1 | |
| shopt -s nullglob ; for file in config-* ; do kernels+=( "${file#config-}" ) ; done | |
| newest="$(printf '%s\n' "${kernels[@]}" | sort -V -t - -k 1,2 | tail -n1)" | |
| current="$(uname -r)" | |
| [[ $current != $newest ]] && echo "Reboot needed for new kernel" |
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
| { | |
| "settingsVersion": "1.67.4", | |
| "exclusionRules": [ | |
| { | |
| "pattern": "^https?://www.google.com/(?!maps)*", | |
| "passKeys": "/abcdefhijklmnopqrsuvwyz" | |
| }, | |
| { | |
| "pattern": "^https?://mail.google.com/*", | |
| "passKeys": "#/?cdegijklprsux" |
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 | |
| error_string=("Error: This command has to be run with superuser" | |
| "privileges (under the root user on most systems).") | |
| if [[ $(id -u) -ne 0 ]]; then echo "${error_string[@]}" >&2; exit 1; fi | |
| eval "$(. /etc/os-release && typeset -p ID)" | |
| if [[ $ID =~ ^(debian|ubuntu)$ ]]; then | |
| pkg=deb | |
| apt-get update |
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 | |
| # Installs nginx from nginx repository (not distro repo) | |
| # | |
| # Usage: sudo ./install_nginx.sh [ --stable ] | |
| # --stable option: Use stable channel instead of mainline | |
| # | |
| # Currently supported: | |
| # RHEL | |
| # CentOS |
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
| // ==UserScript== | |
| // @name Twitter Go Back with H key | |
| // @namespace https://gist.github.com/eggbean/ba4daf82f132421c69dbd2c2e0b3e061/raw/twitter_go_back.user.js | |
| // @version 1.1 | |
| // @description Makes the unused H key a browser back button for better H,J,K,L keyboard navigation | |
| // @author https://github.com/eggbean | |
| // @match https://x.com/* | |
| // @icon https://x.com/favicon.ico | |
| // @grant none | |
| // ==/UserScript== |
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 -e | |
| # This script installs or updates to the latest version of Go. | |
| # Multi-platform (Linux and macOS) | |
| # Multi-architecture (amd64, arm64, arm) support | |
| # | |
| # Add to your .profile, .bash_profile or .zshenv: | |
| # export PATH=$PATH:/usr/local/go/bin | |
| error_string=("Error: This command has to be run with superuser" |
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 | |
| # AWS CLI v2 install/update script | |
| # For v2 you either need to install manually | |
| # or use a script like this | |
| # | |
| # For bash v5 > | |
| # | |
| # For auto-completion add `cli_auto_prompt = on` to config | |
| # ..or add AWS_CLI_AUTO_PROMPT=on environment variable |
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 | |
| # dynu.com dynamic IP update script | |
| # variables can be added in file, in sourced file or as command line arguments | |
| set -e | |
| # https://www.dynu.com/en-US/ControlPanel/APICredentials | |
| # oauth2='{Client-Id}:{Secret}' | |
| oauth2='EOJ2S-Z6OoN_le_KS1d75wsZ6y0SFdVsY9183IvxFyZp:EClusMEUk8e9ihI7ZdVLF5cZ6y0SFdVsY9183IvxFyZp' |
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 | |
| # Oracle firewall update script | |
| # Usage: oci-fupdate [ <source-CIDR> ] [ --query ] | |
| # | |
| # Updates an existing Network Security Group to allow SSH access through the OCI | |
| # firewall to reach instances in a public subnet, like bastion hosts. With no | |
| # argument your current public IP address is used, or you can add a source address | |
| # block in CIDR format. The --query option returns the current source address. | |
| # |
OlderNewer