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
# nginx proxy.conf for redirecting remotely to https | |
# It's pretty straightforward. Just need to create the self-signed certs that are to to be placed inside | |
# volume referenced within the docker-compose.yml file and by this proxy.conf (so cert names need to match!). | |
# And place this proxy.conf file inside '/home/docker/nginx/conf.d:/etc/nginx/conf.d' as referenced by the | |
# docker-compose.yml file | |
# example for how I created the self-signed certificate | |
# sudo openssl req -x509 -nodes -days 3365 -newkey rsa:2048 -keyout /etc/nginx/certs/example.com.key -out /etc/nginx/certs/example.com.crt | |
server { |
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
import xapi from 'xapi'; | |
// Define a constant variable for the volume level | |
const VOLUME_LEVEL = 50; | |
// Initial volume setup | |
setVolume(VOLUME_LEVEL); | |
// Function to set the volume to a specific level | |
function setVolume(level) { |
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
## Pihole ============================ | |
## Nat routing to force lan dns pihole | |
## Pihole Addr: 192.168.20.205 | |
## NIC: br0 | |
## Start ============================= | |
# dns port 53 - allow, redirect, drop | |
iptables -t nat -A PREROUTING -i br0 -p udp -s 192.168.20.205 --dport 53 -j ACCEPT | |
iptables -t nat -A PREROUTING -i br0 -p tcp -s 192.168.20.205 --dport 53 -j ACCEPT | |
iptables -t nat -A PREROUTING -i br0 -p udp -d 192.168.20.205 --dport 53 -j ACCEPT |
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
// Go to Radarr and click 'settings' => 'general'. | |
// Open the JavaScript Console in Google Chrome (View => Developer => Javascript Console) | |
// Past the following in. Hit enter and away you go. | |
const key = document.getElementsByClassName('x-api-key')[0].value; | |
if (!key) { | |
alert('Navigate to /settings/general and run again'); | |
} |
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 | |
GW=`/sbin/ip route | awk '/default/ { print $3 }'` | |
checkdns=`cat /etc/resolv.conf | awk '/nameserver/ {print $2}' | awk 'NR == 1 {print; exit}'` | |
checkdomain=google.com | |
#some functions | |
function portscan | |
{ |
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
from gpiozero import Button | |
import time | |
import os | |
import RPi.GPIO as GPIO | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(27, GPIO.OUT) | |
stop = Button(4) # defines button as object, choose GPIO 4 | |
restart = Button(17) # defines button as object, choose GPIO 17 | |
display = Button(5) # defines button as object, choose GPIO 5 |