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
checkofscreen=$(ps aux | grep /usr/bin/screen | grep -v grep) | |
if [ -z "$checkofscreen" ] | |
then | |
screen | |
fi |
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
<?php | |
/** | |
* @author Piere Woehl <[email protected]> | |
*/ | |
$connection | |
function queryDB($SQL,$FIELD) { | |
initDB(); // Abstract Function, you have to create yourself | |
global $connection; | |
$result = mysqli_fetch_assoc($connection->query($SQL, MYSQLI_USE_RESULT)); |
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
# Gets the IP address of a computer via the MAC address. This will only work on LAN | |
# segments. By default we'll scan the ARP table, but then defer to an IP scan to | |
# as needed. | |
# | |
# Usage: $returnIpAddress = GetIPFromMAC "12-43-de-52-a9-99" "192.168.10." | |
# Pass in the mac address with dashes (-) as the first parameter | |
# Pass in an IP address with the last number missing, be sure to include the trailing "." | |
# Be sure to check the value if $returnIpAddress -eq $null to see if a value was actually returned | |
# | |
function GetIPFromMAC { |
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 | |
cd <INSERT FOLDER TO DOWNLOAD TO> | |
# LOAD GPG KEY | |
echo "Loading GPG Key..." | |
wget http://archive.raspberrypi.org/debian/raspberrypi.gpg.key | |
# LOAD JESSIE | |
echo "Loading dists/jessie..." | |
wget -nv --progress=bar -N -m --no-parent --cut-dirs=1 --reject "*.html*" http://archive.raspberrypi.org/debian/dists/jessie/ |
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
. . . | |
[Share] | |
. . . | |
hide unreadable = yes | |
hide unwriteable files = yes | |
. . . |
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 (Test-Path "$(Get-Location)\pandoc_html") { | |
Remove-Item -Recurse "$(Get-Location)\pandoc_html" -Force | |
} | |
New-Item -Path "$(Get-Location)\pandoc_html" -ItemType directory | |
Get-ChildItem "$(Get-Location)\*.md" | ForEach-Object { | |
pandoc $_ -f markdown -t html -s -o "$(Get-Location)\pandoc_html\$($_.BaseName).html" | Out-Null | |
} |
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 [[ $(docker inspect -f {{.State.Running}} $USER 2>/dev/null) ]]; then | |
docker exec -it $USER /bin/sh | |
else | |
echo "Initializing your Docker Environment..." | |
docker run --name $USER --privileged -d docker:dind | |
sleep 1 | |
docker exec -it $USER /bin/sh | |
fi |
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
[Unit] | |
Description=Sentry Cron Container | |
After=docker.service | |
[Service] | |
Restart=always | |
ExecStart=/usr/bin/docker start -a sentry-cron | |
ExecStop=/usr/bin/docker stop sentry-cron | |
[Install] |
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
OLDNAME=$(hostname) | |
hostnamectl set-hostname ${1} | |
mkdir -p /etc/pve/nodes/${1} | |
cp -a /etc/pve/nodes/${OLDNAME} /etc/pve/nodes/${1} | |
echo 'A reboot is required, Exit with CTRL-C' | |
read |
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
frontend private-tcp | |
bind 10.147.17.42:80 | |
mode tcp | |
default_backend private-pfsense | |
frontend private-tcp-ssl | |
bind 10.147.17.42:443 | |
mode tcp | |
default_backend private-pfsense-ssl |