- Pihole run script
- Pihole service script
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
| - hosts: localhost | |
| connection: local | |
| gather_facts: no | |
| sudo: no | |
| vars: | |
| homebrew_taps: | |
| - homebrew/binary | |
| - homebrew/versions | |
| - homebrew/dupes | |
| - homebrew/dupes |
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 | |
| SALT_FORMULA_HASH=7abdf217a99d70344b6d936375e802837276a2a3 | |
| rpm --import https://repo.saltstack.com/yum/redhat/6/x86_64/latest/SALTSTACK-GPG-KEY.pub | |
| cat >/etc/yum.repos.d/saltstack.repo <<EOS | |
| [saltstack-repo] | |
| name=SaltStack repo for RHEL/CentOS 6 | |
| baseurl=https://repo.saltstack.com/yum/redhat/6/\$basearch/latest | |
| enabled=1 | |
| gpgcheck=1 | |
| gpgkey=https://repo.saltstack.com/yum/redhat/6/\$basearch/latest/SALTSTACK-GPG-KEY.pub |
- download and unzip stable RealtimePi distro
- write the extracted .img to sdcard with Etcher
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 | |
| modprobe libcomposite | |
| cd /sys/kernel/config/usb_gadget/ | |
| mkdir g && cd g | |
| echo 0x1d6b > idVendor # Linux Foundation | |
| echo 0x0104 > idProduct # Multifunction Composite Gadget | |
| echo 0x0100 > bcdDevice # v1.0.0 |
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
| if [[ -n "${DATABASE_URL}" ]]; then | |
| parse_dsn() { | |
| declare dsn=$1 part=$2 | |
| php -r 'echo parse_url($_SERVER["argv"][1], constant("PHP_URL_" . strtoupper($_SERVER["argv"][2])));' -- "${dsn}" $part | |
| } | |
| host=$(parse_dsn "${DATABASE_URL}" host) | |
| port=$(parse_dsn "${DATABASE_URL}" port) | |
| database=$(parse_dsn "${DATABASE_URL}" path); database=${database:1} | |
| user=$(parse_dsn "${DATABASE_URL}" user) |
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 | |
| parse_dsn() { | |
| declare dsn=$1 part=$2 | |
| php -r 'echo parse_url($_SERVER["argv"][1], constant("PHP_URL_" . strtoupper($_SERVER["argv"][2])));' -- "$dsn" $part | |
| } |
awesome-api - A curated list of awesome resources for design and implement RESTful API's
public-apis - A collective list of free APIs for use in software and web development
postwoman - A free, fast and beautiful API request builder (web alternative to Postman)
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
| // in your .env file, split APP_URL to extract protocol and hostname | |
| APP_PROTOCOL=https | |
| APP_HOSTNAME=myapp.test | |
| APP_URL="${APP_PROTOCOL}://${APP_HOSTNAME}" | |
| // install dotenv | |
| npm install dotenv |
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
| # GistID:963f95aaf61d50e512511ac4eb097e50 | |
| function add_alias() { | |
| if [[ -z $1 || -z $2 || $# -gt 2 ]]; then | |
| echo usage: | |
| echo "\t\$$0 ll 'ls -l'" | |
| else | |
| echo "alias $1='$2'" >> $ALIASFILE | |
| echo "alias ADDED to $ALIASFILE" | |
| alias $1="$2" | |
| fi |