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
#!/usr/bin/env bash | |
DIR_NAMES=( "www.domain1.org" "www.domain1.org" ); | |
cd ${1:-./} | |
for DIR_NAME in "${DIR_NAMES[@]}"; do | |
echo ok | |
DIR_ID=`gdrive list -m 500 -q "sharedWithMe = true" | grep -i ${DIR_NAME} | awk '{ print $1 }'` | |
gdrive download --recursive --force ${DIR_ID} | |
done |
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
<form action = "http://192.168.1.0/tools_admin.php??NO_NEED_AUTH=1&AUTH_GROUP=0" method = "POST"> | |
<input type = "hidden" name = "ACTION_POST" value = "LOGIN" /> | |
<input type = "hidden" name = "LOGIN_USER" value = "a" /> | |
<input type = "hidden" name = "LOGIN_PASSWD" value = "b" /> | |
<input type = "hidden" name = "login" value = "+ Log + In +" /> | |
<input type = "hidden" name = "NO_NEED_AUTH" value = "1" /> | |
<input type = "hidden" name = "AUTH_GROUP" value = "0" /> | |
Login: | |
<input type = "text" name = "admin_name" value = "admin" /> | |
Password: |
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 | |
# Set fields in /etc/ocsercv/ocserv.conf.template as below | |
# | |
# connect-script = /path/to/vpn-hostnames.sh | |
# disconnect-script = /path/to/vpn-hostnames.sh | |
# Set field in /etc/config/dhcp as below | |
# | |
# config dnsmasq |
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
#!/usr/bin/env bash | |
# script: watch | |
# author: Mike Smullin <[email protected]> | |
# license: GPLv3 | |
# description: | |
# watches the given path for changes | |
# and executes a given command when changes occur | |
# usage: | |
# watch <path> <cmd...> | |
# |
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
#!/usr/bin/env bash | |
TASK_LIMIT=4 | |
# ########################## HOW-TO ########################################## # | |
# 1. Include in your script with source <(curl -s <URL>) # | |
# 2. Override max simultaneous workers by TASK_LIMIT # | |
# 3. Define func1 that will generate workers data/ atleast their ids # | |
# 4. Define func2 that will contain logic to handle segmet of worker # | |
# 5. Define func3 that will agregate computed results # | |
# 6. Run divide_and_conquer func1 func2 func2 and wait for script to end # |
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
GIST_PROFILE_PATH=~/.bash_profile_gist | |
GIST_PROFILE_URI=https://gist.githubusercontent.com/aenniw/7f1883a867e5d551b9c859eba176b6b3/raw/.bash_profile_gist | |
function update-gist() { | |
curl -s ${GIST_PROFILE_URI} 2>/dev/null > ${GIST_PROFILE_PATH} | |
} | |
function resource-gist() { | |
test -f ${GIST_PROFILE_PATH} && \ | |
source ${GIST_PROFILE_PATH} |
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 | |
# Usage: USER=user PASSWD=secret volumio2-ui-basic-auth.sh or | |
# volumio2-ui-basic-auth.sh for default user volumio:volumio | |
sudo su || exit 1 | |
apt-get install apache2-utils nginx | |
htpasswd -cb /etc/nginx/.htpasswd ${USER:-volumio} ${PASSWD:-volumio} |
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 | |
SINGLE_DOMAIN=${SINGLE_DOMAIN:-my.domain.org} | |
opkg install ca-certificates ca-bundle curl | |
hash acme.sh || ( curl https://get.acme.sh | sh && \ | |
ln -s /root/.acme/acme.sh /usr/bin/ ) | |
acme.sh --issue -d ${SINGLE_DOMAIN} --dns --force |
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 | |
# DEPENDENCIES | |
# apt-get -y install fbi curl | |
# PINOUT: Display -> Raspberry Pi Zero | |
# BL -> pin 12 (GPIO 18) | |
# SCK -> pin 23 (GPIO 11) | |
# MISO -> pin 21 (GPIO 9) | |
# MOSI -> pin 19 (GPIO 10) |
OlderNewer