Skip to content

Instantly share code, notes, and snippets.

🍏
Cogito

Jan Schnasse jschnasse

🍏
Cogito
Block or report user

Report or block jschnasse

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jschnasse
jschnasse / progress.sh
Last active Jan 23, 2019
a bash script to demonstrate bash input and output
View progress.sh
function readCommand(){
lastCommand=$1
read -t.1 -n1 c;
if [ "$c" = "p" ]
then
printf "\n\r";
return 0
fi
if [ "$c" = "g" ]
then
@jschnasse
jschnasse / depersonalize-apache-logs.sh
Last active Nov 13, 2018
What to do with apache logs?
View depersonalize-apache-logs.sh
#! /bin/bash
# only work on files older then $days
days=7
# look for files in this directory
logDir="/var/log/apache2/"
# with this extension
extension="*.gz"
# depersonalize by replacing the last two bytes of an IP with this string
anoBytes=".0.0"
View backup-db.sh
#! /bin/bash
scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $scriptdir
source variables.conf
function init(){
echo "Init"
mkdir -p $BACKUP/mysql
echo "Done!"
You can’t perform that action at this time.