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/ | |
| git clone --bare https://github.com/jmcker/.cfg.git $HOME/.cfg | |
| function cfg { | |
| /usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@ | |
| } | |
| mkdir -p .cfg-backup | |
| cfg checkout |
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
| /** | |
| * GET contents of a URL | |
| * @access private | |
| * @param {string} url - url to get | |
| * @param {function} error - function to call if there is an error | |
| * @param {function} callback - function to call if success | |
| * @returns {void} | |
| */ | |
| function httpGet(url, error, callback) { |
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 | |
| RED='\033[0;31m' | |
| YELLOW='\033[1;33m' | |
| BLUE='\033[1;96m' | |
| NC='\033[0m' # No color | |
| GITHUB="false" | |
| USERNAME="" | |
| TARGETNAME="" |
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 | |
| AUTO_LOGIN="true" | |
| LIST_ALL="false" | |
| VERBOSE="false" | |
| USERNAME="${USER}" | |
| TARGETNAME="xinu" | |
| SEARCH_NAME="" | |
| MIN_USER_COUNT=-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
| #!/bin/bash | |
| TO_HTTP="false" | |
| BASE_HOST="github.com" | |
| function help-text() { | |
| echo "git-protocol-switcher (git-prot)" | |
| echo " Switch all remotes in a git repo from HTTP to SSH (and vice-versa) with a single command." | |
| echo " This assumes a host of https://github.com" | |
| 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <base href="app://./" /> | |
| <meta http-equiv="Content-Security-Policy" content="script-src 'self' app:; object-src 'self' app:;"> | |
| <script type="module" src="./module.js"></script> | |
| </head> | |
| <body> | |
| Check the console! |
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
| netsh wlan export profile key=clear |
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 | |
| backup_dir="backup-$(date +%Y-%m-%d_%H:%M:%S)" | |
| mkdir -p "${backup_dir}" | |
| cp *.ovpn "${backup_dir}" | |
| for file in $(ls *.ovpn) | |
| do | |
| if ! cat "${file}" | grep "block-outside-dns" > /dev/null; then | |
| echo "Adding 'block-outside-dns' to ${file}..." |
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
| function spin-wait() { | |
| spin="/-\|" | |
| echo -n "${1:-Press any key to continue...} " | |
| while true | |
| do | |
| printf "\b${spin:i++%${#spin}:1}" | |
| read -n 1 -t 0.25 noop | |
| if [ "${?}" == "0" ]; then | |
| break |
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 | |
| import sys | |
| import urllib.parse | |
| import requests | |
| def get_article_text(page_titles): | |
| ''' | |
| Fetch the plaintext for all of the given pages. |
OlderNewer