Debian Hack - How to Setup your Mirror!
This might not be for all of you but for those Linuxers out there, here’s an example of how to setup your mirror:
(Mirror is a way of replicating one server to another btw if you didn’t know.)
To download the mirrors I use this script:
<script sync_mirror.sh>#!/bin/bash OPTIONS="--nosource --progress --postcleanup --ignore-release-gpg --ignore-small-errors --pdiff=none"; MIRROR=`basename ${0} | cut -f2 -d "_"` DEST="/home/debian-mirror" case "${MIRROR}" in "debian" ) METHOD="--method=http" HOST="--host=ftp.de.debian.org" ROOT="--root=debian" DIST="--dist=etch,etch-proposed-updates" ARCH="--arch=i386" SECTION="--section=main,contrib,non-free" DEST="${DEST}/debian/" ;; "security" ) METHOD="--method=ftp" HOST="--host=security.debian.org" ROOT="--root=/debian-security/" DIST="--dist=etch/updates" ARCH="--arch=i386" SECTION="--section=main,contrib,non-free" DEST="${DEST}/debian-security/" ;; "volatile" ) METHOD="--method=http" HOST="--host=volatile.debian.org" ROOT="--root=debian-volatile" DIST="--dist=etch/volatile" ARCH="--arch=i386" SECTION="--section=main,contrib,non-free" DEST="${DEST}/debian-volatile/" ;; "multimedia" ) METHOD="--method=http" HOST="--host=www.debian-multimedia.org" ROOT="--root=/" DIST="--dist=etch" ARCH="--arch=i386" SECTION="--section=main" DEST="${DEST}/debian-multimedia/" ;; "backports" ) METHOD="--method=http" HOST="--host=www.backports.org" ROOT="--root=debian" DIST="--dist=etch-backports" ARCH="--arch=i386" SECTION="--section=main,contrib,non-free" DEST="${DEST}/debian-backports/" ;; * ) echo "${0} called incorrectly" exit ;; esac debmirror ${OPTIONS} ${METHOD} ${HOST} ${ROOT} ${DIST} ${ARCH} ${SECTION} ${DEST}</script sync_mirror.sh>
To setup the permissions I use this script:
<script permissions.sh>#!/bin/bash MIRROR=`basename ${0} | cut -f2 -d "_"` DEST="/home/debian-mirror" case "${MIRROR}" in "debian" ) DEST="${DEST}/debian/" ;; "security" ) DEST="${DEST}/debian-security/" ;; "volatile" ) DEST="${DEST}/debian-volatile/" ;; "multimedia" ) DEST="${DEST}/debian-multimedia/" ;; "backports" ) DEST="${DEST}/debian-backports/" ;; * ) echo "${0} called incorrectly" exit ;; esac echo "Setting Ownership" chown -R www-data:www-data ${DEST} echo "Setting File Permissions" chmod -R 660 ${DEST} echo "Setting Folder Permissions" find ${DEST} -type d -exec chmod 770 {} \;</script permissions.sh>
And then to pull it all together I have thefollowing directory structure (mirrors left out as it’s a ling list of files)
/home/debian-mirror/ |-- debian |-- debian-backports |-- debian-multimedia |-- debian-security |-- debian-volatile |-- scripts | |-- permissions.sh | `-- sync_mirror.sh `-- scripts.d |-- mirror_backports -> ../scripts/sync_mirror.sh |-- mirror_debian -> ../scripts/sync_mirror.sh |-- mirror_multimedia -> ../scripts/sync_mirror.sh |-- mirror_security -> ../scripts/sync_mirror.sh |-- mirror_volatile -> ../scripts/sync_mirror.sh |-- permissions_backports -> ../scripts/permissions.sh |-- permissions_debian -> ../scripts/permissions.sh |-- permissions_multimedia -> ../scripts/permissions.sh |-- permissions_security -> ../scripts/permissions.sh `-- permissions_volatile -> ../scripts/permissions.shAnd then I just setup a cronjob:
0 0 * * 0 root /bin/run-parts --verbose /home/debian-mirror/scripts.d | /usr/bin/mailx -s "`uname -n` - Debian mirror sync completed" rootThis was to disable the mirroring of one of the repositories I just need to remove the symlink from the scripts.d folder
Bottle Opener USB Flash Drive!

Bottle Opener USB Flash Drive!
Although I rather use a lighter to open a beer bottle, for those of you who don’t smoke, you can get the Bottle Opener USB Flash Drive.
Just make sure you don’t take this to a raving party with tons of people as you might regret lending it to the partier next to you with all that classified data inside the Flash Drive.
The TrekStor USB thumb drive doubles as a bottle opener. Yep, it can store between 1GB and 16GB of data, and it can open up your frosty brews as well. Make it your keychain and you’ll always have whatever data you want with you, be it documents or media files, and you’ll never be searching for a bottle opener again. It makes regular old thumb drives look downright featureless in comparison.
via dvice, Product Page
DIY Hacked USB Thumb Drive!

DIY Hacked USB Thumb Drive!
For those of you who need a real USB Thumb drive, this might not be the right picture but for those of you who want to have some fun, just go and grab an old harddrive, USB ports, and couple USB Flash Drives for a real good Thumb Drive laughs.
This ordinary looking hard drive when plugged into a USB port will mount 4 USB thumbdrives onto your computer. Cool idea to make some use of some old computer parts. It would have been cool if the drive would spin up when one of the drives were being accessed.
via hackedgadgets, DIY Page
USB “Thumb” Flash Drive!
![]()
It’s not that often that a manufacturer takes things literally and makes a USB “Thumb” Flash Drive, but you are glad that they did.
Features:
via geekalerts, Product Page
Mooncake USB Flash Drive!

Mooncake USB Flash Drive!
For all I know, there’s way too many “food” USB Flash Drives and here’s another Mooncake USB Flash Drive, which I suppose are targetting Chinese people.
Mooncakes are Chinese pastry traditionally eaten during the Mid-Autumn Festival. These little geeky USB thumb drives look so real, don’t chew it, don’t ever put them in your mouth. Keep them away from your kids or they’ll swallow!
via brando
Machine Gun Bullet USB Flash Drive!

Here’s an innovative idea for a USB Flash Drive, embed it in a machine gun bullet.
Headless Teddy Bear USB Flash Drive!

Check out this Teddy Bear USB Flash Drive that will lose it’s head just so you can stick it in your computer.
Sorta cool until the head falls off, maybe they should market the product with the head on for better reception by consumers.
via geekalerts, Product Page
USB “Key” Flash Drives!

Check out these new USB “Key”-shaped flash drives that you can link on your keychain.
Aexea KeyXpress Flash Drive is a fashionable and stylish mass storage device. You can hook it on your mobile phone so that your data and information will be there wherever you go. Just plug it into the USB port, and the computer will automatically detect and configure without restarting.
Wooden USB Flash Drive!

I do prefer wooden USBs over plastic ones simply due to the fact that they are more shock-absorbent upon dropping them from high floors.
This one is from Japan and does indeed look pretty cool.
I like this Wooden Thumb Drive. Its casing is made of cedar wood and provides 1GB of storage capacity. The Wooden Thumb Drive retails for approx. $62 in Japan.
via techfresh, Product Page, Product Press Release
Related:





