Dienstag, 22. Dezember 2009
Samstag, 12. Dezember 2009
timelapse movie
http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome
edit motion.conf
# Image width (pixels). Valid range: Camera dependent, default: 352
width 640
# Image height (pixels). Valid range: Camera dependent, default: 288
height 480
output_normal off
- set timelapse var (use 10min) get an idea aoubit settings from http://en.wikipedia.org/wiki/Time-lapse
# Use ffmpeg to encode a timelapse movie
# Default value 0 = off - else save frame every Nth second
ffmpeg_timelapse 600
# The file rollover mode of the timelapse video
# Valid values: hourly, daily (default), weekly-sunday, weekly-monday, monthly, manual
ffmpeg_timelapse_mode manual
- dowload sunwait http://ppa.launchpad.net/mdeslaur/ubuntu/pool/main/s/sunwait/
Dienstag, 9. Juni 2009
Save torrenting moblock peerguardian
Using moblock according to
http://moblock-deb.sourceforge.net/
additional how to under: https://help.ubuntu.com/community/MoBlock
Very important: make sure you can still talk to your headless machine!! add doing
sudo nano /etc/blockcontrol/blockcontrol.conf
ssh allow all incoming traffic on port 22
WHITE_TCP_IN="22"
otherwise you will be blocked out!
Mittwoch, 4. Februar 2009
Check network connection
#!/bin/bash
x=`ping -c1 google.com 2>&1 | grep unknown`
if [ ! "$x" = "" ]; then
echo "It's down!! Attempting to restart."
/etc/init.d/networking restart
echo "restarted gurke" | mail -s gurke_restart test@hotmail.com
fi
- chmod 777 check_network.sh
- add it to crontab so it checks it for every hour or so..
Mittwoch, 2. Juli 2008
webgui status rtorrent over cgi
http://www.g-loaded.eu/2007/06/23/rtorstat-a-simple-rtorrent-status-web-page-generator/
1) to get it run
edit rtorstat.py and get rid of this:
Requirement
try:
from bencode import bdecode
except ImportError:
try:
from BitTorrent.bencode import bdecode
except ImportError:
sys.stderr.write("%s: ERROR: Missing dependency\nbencode.py was not found in current directory or in local BitTorrent Client (Mainline) installation.\n" % sys.argv[0])
sys.stderr.flush()
sys.exit(1)
download somewhere from the web "bencode.py" file and JUST paste it where the previouys lines above were....
2) access over the your installation
place 3 files in your cgi-bin (/usr/lib/cgi-bin/) : rtorstat.py, rtorstat.cgi and bencode.py.
Now, you can visit the web page http://yourdomain.example.org/cgi-bin/rtorstat.cgi
Samstag, 26. Januar 2008
External Hard Drive
get more gigs
you can not life these days with only 20 gig, so: configuring the External Hard Drive, as recommended in herea)add in /etc/fstab
/dev/sdb1 pladde/ ntfs-3g defaults,force 0 0
b) After the installation is done, you can optionally add an external hard drive to make it easier to move your data. We'll be using a service called "autofs" to automatically detect your hard drive and make it ready to share on the network each time you plug it in. To install autofs, use this command:
sudo apt-get install autofs
Once that finishes, you'll want to connect your external hard drive and find out what device Ubuntu assigns it. After plugging in the hard drive wait a few seconds and then enter this command:
dmesg | tail
You should see something very similar to this:
[47820.164000] sdb: Write Protect is off
[47820.164000] sdb: Mode Sense: 03 00 00 00
[47820.164000] sdb: assuming drive cache: write through
[47820.164000] SCSI device sdb: 398297088 512-byte hdwr sectors (203928 MB)
[47820.168000] sdb: Write Protect is off
[47820.168000] sdb: Mode Sense: 03 00 00 00
[47820.168000] sdb: assuming drive cache: write through
[47820.168000] sdb: sdb1
[47820.184000] sd 4:0:0:0: Attached scsi disk sdb
[47820.184000] sd 4:0:0:0: Attached scsi generic sg2 type 0
The line "[47820.168000] sdb: sdb1" is what you'll want to pay attention to. This tells us that Ubuntu is assigning the device to "sdb", and it's partition is labeled as "sdb1". "1" being the first and only partition on the disk. Next, we'll what to find out what kind of partition is on the disk. Enter this into the console:
sudo fdisk -l /dev/sdb
The "System" column will display what kind of partition it is. Take note on what type of partition it is for the following instructions. If it's "HPFS/NTFS", you'll want to use the "ntfs-3g" driver. If it contains "FAT", you'll use the "vfat" driver. Finally, if it's "Linux", you can just use the "auto" driver. Note, if it is a NTFS partition, you will have to manually install the new NTFS read/write drivers by using:
sudo apt-get install ntfs-3g
Next, we'll want to add this information to the autofs service. Use to following command to edit to autofs master configuration file:
sudo nano /etc/auto.master
Note: You can replace "nano" with your preferred text editor. To save a file in nano, use the keyboard shortcut Ctrl+O. To exit, press Ctrl+X.
Now, find the line containing:
#/misc /etc/auto.misc
Change it to:
/misc /etc/auto.misc --timeout=60
Save it and edit the autofs "miscellaneous" configuration file next by entering this command:
sudo nano /etc/auto.misc
Add this to the bottom of the file:
external -fstype=ntfs-3g :/dev/sdb1
Remember to replace "ntfs-3g" with the type of driver you found earlier in this section. Note, if you are using "ntfs-3g", you might want to append ",force" , making it "-fstype=ntfs-3g,force". This makes it easier to use uncleanly unmounted drives. This maybe a little risky, but it makes it so much easier to troubleshoot.
Finally, restart the autofs service:
sudo /etc/init.d/autofs restart
Now, every time anything tries to find files in the "/misc/external" directory, Ubuntu will attempt to automatically mount that drive to be used.
accessing mybox from everywhere
Add DynDNS to your router (if your router does not support DynDNS, good luck wit the http://en.wikipedia.org/wiki/DD-WRT fimrware) so you can access your network from outside, even if your provider changes the IP.