Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexander Dahl LeSpocky

View GitHub Profile
@LeSpocky
LeSpocky / tlue_tar.cpp
Created Feb 21, 2014
an example for a complete zlib wrapper for libtar using C++ vectors for associating zlib file handles to libtar file descriptors
View tlue_tar.cpp
/*******************************************************************//**
* @file tlue_tar.cpp
*
* Test libtar.
*
* @author Alexander Dahl <post@lespocky.de>
* @date Created: 2014-02-21
*
* Copyright 2014 Alexander Dahl
**********************************************************************/
View gpg-clean-keyring.sh
#!/bin/sh
for KEYID in `gpg --list-keys --fixed-list-mode --with-colons | grep "^pub" | cut -f5 -d":"`
do
gpg --batch --refresh-keys $KEYID
sleep 3
gpg --batch --edit-key $KEYID clean save
echo "---------- ---------- ----------"
sleep 3
done
@LeSpocky
LeSpocky / backup-nettworks-svn.sh
Last active Aug 29, 2015
Shell-Skript, das von cron ausgeführt wird auf einem Debian GNU/kFreeBSD um meine Subversion-Repository-Mirrors auf den aktuellen Stand zu bringen.
View backup-nettworks-svn.sh
#!/bin/sh
# get new svn revisions
echo '> syncing fli4l repository'
/usr/bin/svnsync sync file:///tank/backup/nettworks/svn/fli4l
echo ''
# get new svn revisions
echo '> syncing eisfair repository'
/usr/bin/svnsync sync file:///tank/backup/nettworks/svn/eisfair
@LeSpocky
LeSpocky / backup.sh
Last active Aug 29, 2015
Backup file system from remote server. Copy changed stuff with rsync. Create ZFS snapshots with zfSnap. Rotation is done by another cron job deleting expired snaphosts. Moved to https://github.com/LeSpocky/rzfsnapup
View backup.sh
#!/bin/sh
set -e
set +x
# set paths here
DATE='/bin/date'
RSYNC='/usr/bin/rsync'
SSH='/usr/bin/ssh'
ZFSNAP='/usr/sbin/zfSnap'
View ffmap-stat-panel.pl
#!/usr/bin/perl -w
use strict;
use warnings;
use Data::Dumper;
use JSON;
use LWP::Simple;
# init variables
View keybase.md

Keybase proof

I hereby claim:

  • I am LeSpocky on github.
  • I am lespocky (https://keybase.io/lespocky) on keybase.
  • I have a public key whose fingerprint is 02C8 A590 7FE5 CA5F 3601 D1D5 8FBA 7744 CC87 10D0

To claim this, I am signing this object:

View ffmd-to-ffapi.pl
#!/usr/bin/perl -w
# on debian install packages:
# libjson-perl, libwww-perl, perl-modules, perl-base
use strict;
use warnings;
use Carp;
#use Data::Dumper;
@LeSpocky
LeSpocky / .gitconfig
Created Jul 29, 2015
git config für ptxdist
View .gitconfig
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "upstream"]
url = http://git.pengutronix.de/git/ptxdist.git
fetch = +refs/heads/*:refs/remotes/upstream/*
[branch "master"]
remote = origin
@LeSpocky
LeSpocky / check-domain-connect.sh
Last active Dec 17, 2015
Little shell script to check if a domain is still connected. Run with cron job!
View check-domain-connect.sh
#!/bin/sh
if whois $1 | grep -i status | grep -q connect
then
echo "$1 still connected" >/dev/null
else
echo "*** The domain $1 is not connected! ***"
fi
changed=$(whois $1 | grep -i changed)
old_changed=$(cat ~/var/domain_changed_${1})
@LeSpocky
LeSpocky / flut.sh
Last active Dec 18, 2015
in cronjob tun und die webcam-bilder ablegen mit zeitstempel
View flut.sh
#!/bin/sh
sleep 84
cd /home/alex/public_html/flut
wget -q http://www.eulenspiegel-multimedia.de/images/flut/flut_aktuell.jpg -O flut_aktuell_$(date +'%Y-%m-%d_%H:%M').jpg