added bash scripts
This commit is contained in:
parent
7ae3b003b5
commit
a57935d538
17 changed files with 127 additions and 0 deletions
2
bash_scripts/changestation
Executable file
2
bash_scripts/changestation
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
wget http://87.230.33.74:2944/$1
|
41
bash_scripts/deviantbg
Executable file
41
bash_scripts/deviantbg
Executable file
|
@ -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 '<media:content url=".*" height=".*" width=".*" medium="image"/>' | 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
|
2
bash_scripts/flv2mp4
Executable file
2
bash_scripts/flv2mp4
Executable file
|
@ -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"
|
2
bash_scripts/geo2gps
Executable file
2
bash_scripts/geo2gps
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
gpsbabel -i geo -f $1 -o garmin -F /dev/ttyS0
|
19
bash_scripts/getpanoramas
Executable file
19
bash_scripts/getpanoramas
Executable file
|
@ -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
|
2
bash_scripts/gps2gpx
Executable file
2
bash_scripts/gps2gpx
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
gpsbabel -t -i garmin -f /dev/ttyS0 -o gpx -F /home/steffen/Desktop/track.gpx
|
2
bash_scripts/gps2pc
Executable file
2
bash_scripts/gps2pc
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
gpsbabel -w -t -r -i garmin -f /dev/ttyS0 -o kml -F /home/steffen/.googleearth/gps2pc.kml
|
2
bash_scripts/ipodvideo
Executable file
2
bash_scripts/ipodvideo
Executable file
|
@ -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
|
5
bash_scripts/m4a2mp3
Executable file
5
bash_scripts/m4a2mp3
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
for i in *.m4a; do
|
||||
echo "Converting: ${i%.m4a}.mp3"
|
||||
faad -o - "$i" | lame - "${i%.m4a}.mp3"
|
||||
done
|
2
bash_scripts/mountcrypt
Executable file
2
bash_scripts/mountcrypt
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
gpg -d /media/STEFFEN-KEY/.secret/luks.key.enc | pmount -p - $1 $2
|
11
bash_scripts/mountl2p
Executable file
11
bash_scripts/mountl2p
Executable file
|
@ -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
|
6
bash_scripts/mousewheel
Executable file
6
bash_scripts/mousewheel
Executable file
|
@ -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
|
3
bash_scripts/netdev
Executable file
3
bash_scripts/netdev
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
gksudo /etc/init.d/apache2 restart
|
||||
gksudo /etc/init.d/mysql restart
|
19
bash_scripts/panel
Executable file
19
bash_scripts/panel
Executable file
|
@ -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
|
2
bash_scripts/pc2gps
Executable file
2
bash_scripts/pc2gps
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
gpsbabel -w -t -r -i kml -f /home/steffen/.googleearth/pc2gps.kml -o garmin -F /dev/ttyS0
|
5
bash_scripts/presentation
Executable file
5
bash_scripts/presentation
Executable file
|
@ -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
|
2
bash_scripts/router
Executable file
2
bash_scripts/router
Executable file
|
@ -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 '<?xml version="1.0" encoding="utf-8"?> <s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <u:ForceTermination xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1" /> </s:Body> </s:Envelope>'
|
Loading…
Add table
Reference in a new issue