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 | |
| set -euo pipefail | |
| usage() { | |
| cat <<EOF | |
| Usage: $(basename "$0") [--clear-attrs] <path-to-app> | |
| Re-codesign an .app bundle deeply with an ad-hoc signature. | |
| Options: |
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/sh +ux | |
| # We set the sh +ux flags so that we error on undefined variables and error on bad commands | |
| help() { | |
| echo >&2 "$0 [-f] [-p] [-q] [<priv_key_file>] [<key_type>] [<key_comment>]" | |
| echo >&2 | |
| echo >&2 "-q / --quiet to silent all output (except -p if passed)" | |
| echo >&2 "-p / --pubkey to output public key after generation" | |
| echo >&2 "-f / --force to force replacing existing key" | |
| echo >&2 |
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/sh | |
| DEBUG="NO" | |
| LOGGER_NAME="firewall" | |
| PORTS="tcp:9443" | |
| WAN="$1" | |
| log() { | |
| if [ "$DEBUG" == "YES" ]; then | |
| echo "$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
| glm() { | |
| unset ANTHROPIC_API_KEY | |
| unset HTTP_PROXY | |
| unset HTTPS_PROXY | |
| export ANTHROPIC_BASE_URL="https://api.z.ai/api/anthropic" | |
| export ANTHROPIC_AUTH_TOKEN="<YOUR_API_KEY>" | |
| export ANTHROPIC_MODEL="glm-4.6" | |
| export ANTHROPIC_DEFAULT_OPUS_MODEL="glm-4.6" | |
| export ANTHROPIC_DEFAULT_SONNET_MODEL="glm-4.6" | |
| export ANTHROPIC_DEFAULT_HAIKU_MODEL="glm-4.5-air" |
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
| HOSTNAME=`hostname` ssh-keygen -t rsa -C "$HOSTNAME" -f "$HOME/.ssh/id_rsa" -P "" && cat ~/.ssh/id_rsa.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
| #!/bin/bash | |
| # Add this line into /boot/config/go where username is the user you want to setup, probably root | |
| #/boot/config/ssh/setup_ssh_client.sh "username" | |
| if [[ "$1" == "" ]]; then | |
| echo "Invalid User!" | |
| exit 1 | |
| fi |
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
| --- | |
| globs: **/trigger/**/*.ts, **/trigger/**/*.tsx,**/trigger/**/*.js,**/trigger/**/*.jsx | |
| description: Guidelines for writing Trigger.dev tasks | |
| alwaysApply: false | |
| --- | |
| # How to write Trigger.dev tasks | |
| ## Overview of writing a Trigger.dev task | |
| 1. Run the CLI `init` command: `npx trigger.dev@v4-beta init`. |
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
| curl -s http://mirrors.ubuntu.com/mirrors.txt | xargs -n1 -I {} sh -c 'echo `curl -r 0-102400 -s -w %{speed_download} -o /dev/null {}/ls-lR.gz` {}' | sort -g -r | head -1 | awk '{ print $2 }' |
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 | |
| # INSTRUCTIONS | |
| # After generating the OpenVPN server certificates, download and unzip then run this script in the same directory. | |
| # Don't forget to chmod +x fastest-server.sh after downloading | |
| # | |
| # To test all servers with UK in the name | |
| # sudo ./fastest-server.sh UK | |
| # To test all servers with USA in the name | |
| # sudo ./fastest-server.sh USA |
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 | |
| # | |
| # AUTHOR: Andy Savage <andy@savage.hk> | |
| # GITHUB: https://gist.github.com/hongkongkiwi/cfef6910c5c644eaebc9 | |
| # PURPOSE: After building one or more packages in OpenWRT this script signs them with a key file | |
| # this can then be easily used in opkg to verify signatures. | |
| # | |
| KEY_DIR="$HOME/signify-keys" |
NewerOlder