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
#include <stdio.h> | |
/******************** | |
* Enterprise array handler | |
* (c) 2018 Polprog | |
* | |
********************/ | |
//TODO: Rewrite in C++ as a class | |
void * getArrayElement(void * arr, char element, char elementSize){ |
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
This was created as a helper script for backing up my directory with VMs | |
It's not the prettiest one, but it's very simple and flexible. Works for me! | |
Be careful with the remove-old option, you may want to back up some of the older back ups to another place, | |
since it removers EVERY BACKUP OLDER than a week. | |
You definitely want the backup root to be a separate partition or, even better, separate disk. | |
It can be put into cron, if you do so I'd suggest a wrapper script like this: |
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 | |
################################## | |
# Small SSH tunnel helper script | |
# polprog 2017 | |
# http://polprog.net | |
################################## | |
SOCKET="vnctun" |
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 | |
#Analyze fail2ban logs and make a top 10 list of abusers! | |
if [[ $1 == "today" ]]; then | |
echo "Top abusers today:" | |
grep "Ban " /var/log/fail2ban.log | grep `date +%Y-%m-%d` | awk '{print $NF}' | sort | awk '{print $1,"("$1")"}' | logresolve | uniq -c | sort -n | |
else | |
echo "Top abusers:" |
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
#Do not run this !!! | |
#IO operations | |
alias less='cat' | |
alias sed='awk' | |
#administration | |
alias apt-get='aptitude' | |
#file editing |
NewerOlder