Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
cd ~/.gnome2/
if ping -c2 cnlpete.de > /dev/null 2>&1; then
COUNTER=0
while [ $COUNTER -lt 60 ]; do
wget -O world.jpg "http://xearth.org/xearth?mag=0.75&nostars=1&shift=100,0&nolabel=1&nogrid=1&pos=fixed,55,11&markers=1&proj=orthographic&shade=1&night=7&overlayfile=clouds_2048.jpg,none,none,none,none&mapfile=world.topo.bathy.200407.3x5400x2700.jpg&day=100&size=800,600"
temp=$(stat -c%s world.jpg)
#!/bin/bash
TMP=/data/cnlpete/.tmp
TARGET=~/.gnome2
##----------
if ping -c2 google.de > /dev/null 2>&1; then
##receive earth pictures, only do this once ...
cd ${TMP}
@cnlpete
cnlpete / nmeatogpx.sh
Created September 6, 2010 11:06
generate gpx-files from nmea-files
#!/bin/bash
if [ $# -lt 1 ]
then
echo "Nicht genügend Argumente!"
echo "Benutzung: $0 file [file2 [...]]"
exit 1
else
while [ $# -gt 0 ]
@cnlpete
cnlpete / packages.sh
Created September 6, 2010 14:11
simple bash script to create local repo info
#!/bin/sh
FOLDER=/opt/debs
LOGS=$FOLDER/logs
if [ ! -d $FOLDER ]; then
mkdir $FOLDER
if [ ! -d $FOLDER ]; then
sudo mkdir $FOLDER
sudo chown $USER:$USER $FOLDER
@cnlpete
cnlpete / rsnapshotnmount.sh
Created September 19, 2010 18:52
script for rsnapshot calls, but mount the backup device, before this si done and unmount afterwards. Thisway, we might consume less power, because this is only done oncy a day (or week!!)
#!/bin/bash
RSNAPSHOT=/usr/bin/rsnapshot
DEVICE=/dev/disk/by-label/Backup
MOUNTPNT=/media/Backup
#---------------
mounted=0
#mount
@cnlpete
cnlpete / rgm-get.sh
Created January 17, 2011 23:33
rgm-get ... used for getting info from my device and reading nmea and gpx simultaniously .... also supports reading ranges (17-22)
#!/bin/bash
DEVICE=/dev/ttyUSB0
NUMBER=$1
VAR=`echo $NUMBER | grep -o - | wc -l`
if [ "$VAR" == "1" ]
then
#list
POS=`expr index "$NUMBER" -`
#!/bin/bash
#STATUS_FILE=~/.rotate-status
STATUS_FILE=/tmp/.rotate-status
STYLUS=`xsetwacom --list | grep stylus`
STYLUS=${STYLUS%\ STYLUS*}
#STYLUS='Serial Wacom Tablet stylus'
################## Compiz Prevention
function compiz_on {
USER=`ps -ef |grep metacity |grep -v grep|awk -F" " '{print $1}'`
@cnlpete
cnlpete / git repo-backup.sh
Created May 16, 2011 15:18
really basic script to backup a ouple of git-repos , for instance to put in cron or rsnapshot or similar
#!/bin/bash
##host
githost="git@mitharas.de"
#----------
# get list of repos using git gl-info from https://cnlpete@github.com/cnlpete/gitolite-tools.git
#install git ls-info
curdir=`pwd`
cd /tmp
#git clone https://cnlpete@github.com/cnlpete/gitolite-tools.git gitolite-tools
@cnlpete
cnlpete / crontab
Created May 27, 2011 12:25
/etc/init.d/minecraft script to handle minecraft auto-start and backups...
5 */6 * * * /etc/init.d/minecraft backup #backup four times a day, meaning every 6 hours
15 */2 * * * /etc/init.d/minecraft map #generate map every two hours
10 1 * * * /etc/init.d/minecraft clean #clean old files daily
@cnlpete
cnlpete / gist:11180100
Created April 22, 2014 13:53
keybase.md
### Keybase proof
I hereby claim:
* I am cnlpete on github.
* I am cnlpete (https://keybase.io/cnlpete) on keybase.
* I have a public key whose fingerprint is B465 0389 31FB F96A 01FE 905E C9A1 FE6F 665A EEE3
To claim this, I am signing this object: