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
| cd /mnt/user/repos/ | |
| find . -type d -exec chmod 755 {} \; | |
| find . -type f -exec chmod 755 {} \; | |
| find objects/ -type d -exec chmod 755 {} \; | |
| find info/ -type f -exec chmod 644 {} \; | |
| find refs/ -type f -exec chmod 644 {} \; | |
| find objects/ -type f -exec chmod 444 {} \; | |
| find objects/info/ -type f -exec chmod 644 {} \; | |
| chown -R iarp:1000 ./ | |
| chmod 644 HEAD config description |
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 | |
| # {JRE_HOME}\lib\security\java.security and remove RC4 from jdk.tls.disabledAlgorithms | |
| echo -n 'Host: ' | |
| read drachost | |
| echo $drachost | |
| echo -n 'Username: ' | |
| read dracuser |
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
| WIREGUARD_INTERFACE=wg1 | |
| WIREGUARD_LAN=10.253.2.0/24 | |
| MASQUERADE_INTERFACE=eth0 | |
| iptables -t nat -I POSTROUTING -o $MASQUERADE_INTERFACE -j MASQUERADE -s $WIREGUARD_LAN | |
| iptables -N WIREGUARD_INPUT | |
| iptables -N WIREGUARD_DROP_WG0_INPUT | |
| iptables -A INPUT -j WIREGUARD_INPUT |
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 | |
| if [ $# -eq 0 ] | |
| then | |
| echo "Need a name for the peer" | |
| exit 1; | |
| fi | |
| GEN_FILE_SAVE_LOCATION="/etc/wireguard/peer_files" | |
| PUBLIC_IP="123.456.789.111:51820" |
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
| import os | |
| import shutil | |
| floppy = '/home/linux/mounts/floppy/' | |
| root = '/home/linux/mounts/family/Floppy_Disks/' | |
| dirlen = len(os.listdir(floppy)) | |
| print(dirlen) | |
| if not dirlen: | |
| print('empty') |
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
| from __future__ import absolute_import | |
| import os | |
| from celery import Celery | |
| from django.conf import settings | |
| os.environ.setdefault('DJANGO_SETTINGS_MODULE', settings.SETTINGS_MODULE) | |
| project = '.'.join(settings.SETTINGS_MODULE.split('.')[:-1]) |
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
| TIMESTAMP=$(date +%Y-%m-%d-%H.%M.%S) | |
| TMP_DIR="/tmp" | |
| BACKUP_DIR="/home/iarp/backups" | |
| DATABASE="orhc_tryouts" | |
| USERNAME="orhc_tryouts" | |
| HOSTNAME="localhost" | |
| echo "Backing up $DATABASE" |
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
| # trap ctrl-c and call ctrl_c() | |
| trap ctrl_c INT | |
| function ctrl_c() { | |
| exit | |
| } | |
| # check if there are arguments | |
| if (( $# > 0 )); then |
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
| [program:celery-beat] | |
| command=/home/iarp/venv-folder/bin/celery -A django_forms beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler | |
| directory=/home/iarp/site-root | |
| user=iarp | |
| numprocs=1 | |
| stdout_logfile=/home/iarp/celery.beat.log | |
| stderr_logfile=/home/iarp/celery.beat.log | |
| autostart=true | |
| autorestart=true | |
| startsecs=10 |
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/sh | |
| # Delete traffic data leaving X number of months, includes current month | |
| # If command line parameter is not provided then default to 1, which keeps current month only | |
| if [ $1 -gt 0 ]; then i=$1; else i=1; fi | |
| # Get current date in a format compatable with the date -d switch | |
| d=`date +%Y.%m.%d-%H:%M` | |
| # Loop back through the calendar X number of months | |
| # each iteration lands at the last day of the previous month | |
| while [ $i -gt 0 ]; do | |
| d=$(date -D %s -d $(( $(date -d $d +%s)-( $(date -d $d +%d)*86400))) +%Y.%m.%d-%H:%M) |