diff --git a/bash_scripts/changestation b/bash_scripts/changestation new file mode 100755 index 0000000..e6767e1 --- /dev/null +++ b/bash_scripts/changestation @@ -0,0 +1,2 @@ +#!/bin/sh +wget http://87.230.33.74:2944/$1 diff --git a/bash_scripts/deviantbg b/bash_scripts/deviantbg new file mode 100755 index 0000000..df8ffe5 --- /dev/null +++ b/bash_scripts/deviantbg @@ -0,0 +1,41 @@ +#!/bin/bash + +# Deviant Background Changer 1.1 +# by Steffen Vogel (info@steffenvogel.de) +# http://www.steffenvogel.de/2009/11/28/deviantart-wallpapers/ + +# Path to save downloaded images +BG_PATH="/home/steffen/backgrounds" + +# RSS Feed to fetch images from +RSS="http://backend.deviantart.com/rss.xml?q=boost%3Apopular+in%3Aphotography+max_age%3A8h&type=deviation&offset=0" + +# random pool size +POOL_SIZE=10 + +GCONF_URL="/desktop/gnome/background/picture_filename" + +# checks if window manager is running +if [[ $(ps -U $(whoami) -F | grep gnome-terminal | wc -l) > 1 ]] ; then + + # get dbus socket address + export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS= /proc/$(pgrep -u "$(whoami)" gnome-session)/environ | sed -e 's/DBUS_SESSION_BUS_ADDRESS=//') + + # fetch images + wget --user-agent Mozilla/4.0 -q -O - "$RSS" | grep -o '' | grep -E -o -m 5 "http://.*\.(jpg|png|jpeg|gif)" | xargs wget -q -N -P "$BG_PATH" --user-agent Mozilla/4.0 + + # get old image + OLD_BG=`gconftool-2 --get $GCONF_URL` + NEW_BG=$OLD_BG + + until [[ $OLD_BG != $NEW_BG ]]; do + # choose new image + NEW_BG="$BG_PATH/`ls -tr1 $BG_PATH | tail -$POOL_SIZE | head -$((($RANDOM%($POOL_SIZE-1))+1)) | tail -1`" + done + + # set new image + gconftool-2 --type String --set $GCONF_URL "$NEW_BG" + echo $NEW_BG +else + echo "sry no gnome session found!" +fi diff --git a/bash_scripts/flv2mp4 b/bash_scripts/flv2mp4 new file mode 100755 index 0000000..0521082 --- /dev/null +++ b/bash_scripts/flv2mp4 @@ -0,0 +1,2 @@ +#!/bin/bash +ffmpeg -i "$1" -f mp4 -vcodec mpeg4 -maxrate 1000 -b 700 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec aac -ar 44100 -ab 192 -s 320x240 -aspect 4:3 "$1.mp4" diff --git a/bash_scripts/geo2gps b/bash_scripts/geo2gps new file mode 100755 index 0000000..0671ae0 --- /dev/null +++ b/bash_scripts/geo2gps @@ -0,0 +1,2 @@ +#!/bin/bash +gpsbabel -i geo -f $1 -o garmin -F /dev/ttyS0 diff --git a/bash_scripts/getpanoramas b/bash_scripts/getpanoramas new file mode 100755 index 0000000..88604c0 --- /dev/null +++ b/bash_scripts/getpanoramas @@ -0,0 +1,19 @@ +#!/bin/bash + +MIN_DIFF=5 +LAST_TS=0 + +mkdir panorama + +for i in *.JPG; do + TS=`stat -c %Y $i` + + let DIFF=$TS-$LAST_TS + + if [ "$DIFF" -lt "$MIN_DIFF" ]; then + echo $i + cp $i panorama/$i + fi + + LAST_TS=$TS +done diff --git a/bash_scripts/gps2gpx b/bash_scripts/gps2gpx new file mode 100755 index 0000000..3ef22ce --- /dev/null +++ b/bash_scripts/gps2gpx @@ -0,0 +1,2 @@ +#!/bin/bash +gpsbabel -t -i garmin -f /dev/ttyS0 -o gpx -F /home/steffen/Desktop/track.gpx diff --git a/bash_scripts/gps2pc b/bash_scripts/gps2pc new file mode 100755 index 0000000..d1d74a7 --- /dev/null +++ b/bash_scripts/gps2pc @@ -0,0 +1,2 @@ +#!/bin/bash +gpsbabel -w -t -r -i garmin -f /dev/ttyS0 -o kml -F /home/steffen/.googleearth/gps2pc.kml diff --git a/bash_scripts/ipodvideo b/bash_scripts/ipodvideo new file mode 100755 index 0000000..a974056 --- /dev/null +++ b/bash_scripts/ipodvideo @@ -0,0 +1,2 @@ +#!/bin/sh +ffmpeg -i "$1" -f mp4 -vcodec mpeg4 -maxrate 1000 -b 700 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec aac -ar 44100 -ab 192 -s 320x240 -aspect 4:3 $2 diff --git a/bash_scripts/m4a2mp3 b/bash_scripts/m4a2mp3 new file mode 100755 index 0000000..5c9390a --- /dev/null +++ b/bash_scripts/m4a2mp3 @@ -0,0 +1,5 @@ +#!/bin/bash +for i in *.m4a; do + echo "Converting: ${i%.m4a}.mp3" + faad -o - "$i" | lame - "${i%.m4a}.mp3" +done diff --git a/bash_scripts/mountcrypt b/bash_scripts/mountcrypt new file mode 100755 index 0000000..73f38bf --- /dev/null +++ b/bash_scripts/mountcrypt @@ -0,0 +1,2 @@ +#!/bin/bash +gpg -d /media/STEFFEN-KEY/.secret/luks.key.enc | pmount -p - $1 $2 diff --git a/bash_scripts/mountl2p b/bash_scripts/mountl2p new file mode 100755 index 0000000..0c57fe9 --- /dev/null +++ b/bash_scripts/mountl2p @@ -0,0 +1,11 @@ +#!/bin/bash + +// fetch learning rooms +wget https://www2.elearning.rwth-aachen.de/foyer/summary/default.aspx + +// parse urls + +// remove old urls from .gtk-bookmarks + +// append to .gtk-bookmarks +davs://www2.elearning.rwth-aachen.de/ws10/10ws-09977/materials/documents L²P MMET Projekt diff --git a/bash_scripts/mousewheel b/bash_scripts/mousewheel new file mode 100755 index 0000000..acb116d --- /dev/null +++ b/bash_scripts/mousewheel @@ -0,0 +1,6 @@ +#!/bin/sh +xinput set-int-prop "Logitech USB Trackball" "Wheel Emulation" 8 1 +xinput set-int-prop "Logitech USB Trackball" "Wheel Emulation Button" 8 8 +xinput set-int-prop "Logitech USB Trackball" "Wheel Emulation Timeout" 16 200 +xinput set-int-prop "Logitech USB Trackball" "Wheel Emulation X Axis" 8 6 7 +xinput set-int-prop "Logitech USB Trackball" "Wheel Emulation Y Axis" 8 4 5 diff --git a/bash_scripts/netdev b/bash_scripts/netdev new file mode 100755 index 0000000..e5e0fe7 --- /dev/null +++ b/bash_scripts/netdev @@ -0,0 +1,3 @@ +#!/bin/bash +gksudo /etc/init.d/apache2 restart +gksudo /etc/init.d/mysql restart diff --git a/bash_scripts/panel b/bash_scripts/panel new file mode 100755 index 0000000..0a9e444 --- /dev/null +++ b/bash_scripts/panel @@ -0,0 +1,19 @@ +#!/bin/bash + +if [ `gconftool --get /apps/panel/toplevels/bottom_panel_screen0/monitor` == 1 ]; then + gconftool --type int --set /apps/panel/toplevels/bottom_panel_screen0/monitor 0 +else + gconftool --type int --set /apps/panel/toplevels/bottom_panel_screen0/monitor 1 +fi + +if [ `gconftool --get /apps/panel/toplevels/top_panel_screen0/monitor` == 1 ]; then + gconftool --type int --set /apps/panel/toplevels/top_panel_screen0/monitor 0 +else + gconftool --type int --set /apps/panel/toplevels/top_panel_screen0/monitor 1 +fi + +if [ `gconftool --get /apps/panel/toplevels/panel_0/monitor` == 1 ]; then + gconftool --type int --set /apps/panel/toplevels/panel_0/monitor 0 +else + gconftool --type int --set /apps/panel/toplevels/panel_0/monitor 1 +fi diff --git a/bash_scripts/pc2gps b/bash_scripts/pc2gps new file mode 100755 index 0000000..0fd1e4e --- /dev/null +++ b/bash_scripts/pc2gps @@ -0,0 +1,2 @@ +#!/bin/bash +gpsbabel -w -t -r -i kml -f /home/steffen/.googleearth/pc2gps.kml -o garmin -F /dev/ttyS0 diff --git a/bash_scripts/presentation b/bash_scripts/presentation new file mode 100755 index 0000000..061ff05 --- /dev/null +++ b/bash_scripts/presentation @@ -0,0 +1,5 @@ +#/bin/bash + +gksudo modprobe uinput +wminput -c /etc/cwiid/wminput/presentation & +openoffice.org -show /home/steffen/Schule/Informatik/Künstliche\ Intelligenz/Künstliche\ Intelligenz.odp diff --git a/bash_scripts/router b/bash_scripts/router new file mode 100755 index 0000000..866f0c9 --- /dev/null +++ b/bash_scripts/router @@ -0,0 +1,2 @@ +#!/bin/bash +curl "http://fritz.box:49000/upnp/control/WANIPConn1" -H 'Content-Type: text/xml; charset="utf-8"' -H 'SoapAction: urn:schemas-upnp-org:service:WANIPConnection:1#ForceTermination' -d ' '