This file contains 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 | |
# -x used to show output | |
# create functions -------------------------------------------------------------------------------- | |
function readCredentials() { | |
# Needs at least one extra line at the bottom of the | |
# file below the last desired line to read correctly | |
while IFS=: read -r key value | |
do |
This file contains 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
#If the file doesn't exist, create the folder and the file in it. | |
if [ ! -f "$FILE" ]; then | |
mkdir -p $FOLDER | |
touch "$FOLDER/$FILE" | |
fi | |
insert() { | |
file=${1} |
This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
This file contains 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 | |
# Bash Import/Source script | |
# Prints/Sends start/error/end messages | |
set -o pipefail | |
set -o errtrace | |
# Have below variables set | |
TELEGRAM_BOT_TOKEN='' | |
TELEGRAM_CHAT_ID='' |
This file contains 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 -x | |
# curl -L https://gist.github.com/kotashiratsuka/7bee5455b80b573a2b471ca608eccbd4/raw | sh | |
cd | |
test .ssh || mkdir -m 700 .ssh | |
( umask 077; touch .ssh/authorized_keys ) | |
curl -L https://github.com/kotashiratsuka.keys | grep ed25519 >> .ssh/authorized_keys |
This file contains 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
// Work for RedMi 2100 firmware 2.0.23 | |
// http://cdn.cnbj1.fds.api.mi-img.com/xiaoqiang/rom/rm2100/miwifi_rm2100_all_fb720_2.0.23.bin | |
function getSTOK() { | |
let match = location.href.match(/;stok=(.*?)\//); | |
if (!match) { | |
return null; | |
} | |
return match[1]; | |
} |
This file contains 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 | |
# non-interactive kde installer for alpine | |
# apk add curl && curl -L https://cutt.ly/alpine_kde | sh | |
echo "I will make Alpine Linux a Desktop Linux.. ." | |
## Desktop user |
This file contains 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
sudo apt install squid squid-deb-proxy squid-deb-proxy-client squidclient apache2-utils && sudo service squid start && sudo rm -rfv /etc/squid/squid.conf; | |
# Write squid.conf to /etc/squid.squid.conf | |
echo "# apt-get install squid apache2-utils" | sudo tee -a /etc/squid/squid.conf | |
echo "# htpasswd -c /etc/squid/.htpasswd user_name" | sudo tee -a /etc/squid/squid.conf | |
echo "# systemctl restart squid" | sudo tee -a /etc/squid/squid.conf | |
echo "" | sudo tee -a /etc/squid/squid.conf | |
echo "acl CONNECT method CONNECT" | sudo tee -a /etc/squid/squid.conf | |
echo "" | sudo tee -a /etc/squid/squid.conf | |
echo "# line 989: add follows for Basic auth" | sudo tee -a /etc/squid/squid.conf | |
echo "auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/.htpasswd" | sudo tee -a /etc/squid/squid.conf |
NewerOlder