
Shelr.tv allows Unix/Linux command line users to record something interesting from their terminal and share it to followers.
It is a bit like YouTube for plain text shellcasts. A great feature is that you can copy and paste everything you see.
A nice intro with interesting comments from one of the core developers can be found on linuxaria.com.
A Debian package has been proposed through the Debian “package mentor” system.
Prerequisites:
- Install the gphotofs and exif packages.
- Make sure you have the folders $HOME/devices/camera (camera mount point) and $HOME/media/photos (base folder for photo folders) or edit the script below to use different locations.
- Verify that your camera mounts fine using gphotofs and that it internally stores JPGs in a subfolder of “DCIM”.
Save this script as /usr/local/bin/copy-cam-jpgs.sh:
#! /bin/sh
mountpoint=$HOME/devices/camera
targetfolder=$HOME/media/photos
# check availability of cmdline tools
type gphotofs exif fusermount || exit
# mount camera if necessary
if ! mount|grep "$mountpoint"; then
gphotofs "$mountpoint"
fi
cd $mountpoint/*/DCIM/*
for jpg in *.JPG; do
year_month=$(exif --tag=0x9003 -m $jpg \
| cut -f1,2 -d: \
| tr ':' '/')
folder="$targetfolder/$year_month"
mkdir -p "$folder"
mv -v "$jpg" "$folder"
done
cd
fusermount -u $mountpoint
Make it executable like this:
chmod ugo+x /usr/local/bin/copy-cam-jpgs.sh
Then plug in your digital photo camera and run “copy-cam-jpgs.sh“. It will move all JPGs from the camera to $target_folder/yyyy/mm where yyyy is the 4 digit year and mm is the two digit month of the date the photo was taken (as per EXIF data in the JPG).
Sometimes the XFCE desktop icons get messed up, for example by games that temporarily change the screen resolution to 800×600.
A solution to this problem has been mentioned here. It suggests using “sudo chattr +i” to lock the config file where XFCE stores the icon positions.
Alternatively (and without the repeated need for sudo and chattr) you can also backup and restore the ~/.config/xfce4/desktop/icons* file(s) like this:
Create a script /usr/local/bin/save-xfce-desktop-icons.sh like this:
#! /bin/sh
mkdir -p ~/.config/xfce4/desktop.bak
cp -f ~/.config/xfce4/desktop/icons* ~/.config/xfce4/desktop.bak
Create another script /usr/local/bin/load-xfce-desktop-icons.sh like this:
#! /bin/sh
cp -f ~/.config/xfce4/desktop.bak/icons* ~/.config/xfce4/desktop
Make the scripts executable like this
sudo chmod ugo+x /usr/local/bin/save-xfce-desktop-icons.sh
sudo chmod ugo+x /usr/local/bin/load-xfce-desktop-icons.sh
Then in the XFCE start menu, go to “Settings” – “Keyboard” – “Application Shortcuts” and configure 2 keyboard shortcuts:
| Command |
Shortcut |
| save-xfce-desktop-icons.sh |
<Control><ALT>S |
| load-xfce-desktop-icons.sh |
<Control><ALT>L |
Then you will be able to backup and restore your icons like this:
- Backup: Press F5 then <Control><ALT>S then F5
- Restore: Press F5 then <Control><ALT>L then F5
The F5 is necessary to synchronize what you see on the screen with the content of ~/.config/xfce4/desktop/icons*.
A simple shell script – let’s call it index-html.sh – to turn a list of file names into html links:
#!/bin/sh
echo '<html><body>'
sed 's/^.*/<a href="&">&<\/a><br\/>/'
echo '</body></html>'
Example use:
ls | index-html.sh > index.html
I just tested my personal “résumé” – British would say “CV” – website at oliver.doepner.net successfully on IE8, IE9, Firefox 3.6 to 9, latest and older Chrome versions, Opera 10 and 11 and Safari 4 and 5.1. It works on all browsers and looks fine.
You might wonder if I have all these browser installed? No, I don’t. I used the amazing browserling.com service that runs all the various browsers in virtual machines “in the cloud”, and embeds the UI in their website. Cool stuff and currently free for everyone to use!
One caveat with browserling.com is a tool called IETester that they use to emulate the ancient IE5.5 and IE6 browsers. Its seems to have bugs related to PNG graphics which prevented reliable testing. So if anyone out there still uses IE5.5 or IE6: Please visit oliver.doepner.net and let me know if you can see the photo of me on the page with the transparency effect.
On the newer CSS3 capable browsers, my site now sports drop shadows and rounded corners, using border-radius and box-shadow.
I also tested W3C standards compliance (XHTML, CSS3) and all my pages did pass those tests as well. What a nice way to end the computer oriented part of the day …
A Jenkins build server (LTS release) can now be easily installed on the minimalistic Debian VM:
- Download and install Virtualbox
- Download debian-stable-amd64-minimal.ova and import it into Virtualbox
- Start the “debian-stable-amd64-minimal” VM in Virtualbox
- If you are outside Nova Scotia, please review debian-stable-amd64-minimal.txt and adjust locale, timezone and Debian mirror based on your location
- Start an ssh session to localhost, port 1111 (using PuTTY, for example)
- Log in as user (default password is “user”)
- Issue “sudo install.sh jenkins” (default root password is “root”)
- Press enter for any questions during installation
- Open http://localhost:8888/ in a browser on the host OS for Jenkins web ui
You can go to “Manage Jenkins” – “Configure System” and see that JDK, Ant and Maven entries are already configured for you.
Important: Make sure to change root and user passwords to something secure, as mentioned in debian-stable-amd64-minimal.txt.
Regarding the VM that I mentioned in my previous post – this way I also got it to work in VMware Player:
- Install and start Virtualbox (https://www.virtualbox.org/wiki/Downloads)
- Go to File – Import Appliance (and import the ova file mentioned in my last post)
- Close Virtualbox
- Use VBoxManage on the command line to clone the VDI to VMDK, roughly as described here (but do not try to uninstall guest additions): http://scottlinux.com/2011/06/24/convert-vdi-to-vmdk-virtualbox-to-vmware/
- Create a new empty Linux/Debian VM in VMware Player
- Close VMware Player
- Edit the new vmx file so that it points to the cloned vmdk
- Then open the VM in VMware player again. Now it should boot into Debian.
I uploaded a VM image to doepner.net: It is a minimalistic Debian VM that can be used as a base for lean servers. It is in OVA format, exported from Virtualbox 4.1.6. Details are in the corresponding txt file.
You can add the VM to your Virtualbox using “File” – “Import Appliance …”. VMware should also work but might require some compatibility conversion of the ova file.
Recipes for specific Nexus, Jenkins, Wiki, Bugzilla setups will follow … I will publish those as scripts/instructions relative to the minimal base image, rather than maintaining several VMs.
I uploaded a lightweight Eclipse package (based on Helios 3.6.1) for web development (includes Maven, SVN and basic Spring integration, JEE / web tools plugins, but no Mylyn or other non-essential stuff) … This is currently only for Windows. It requires a JDK and is completely free / open source software.
See the txt file for quick installation steps.
bash script to recursively sanitize folder and file names:
#! /bin/bash
shopt -s extglob;
find $1 -depth -print | while read path
do
filename=$(basename "$path")
directory=$(dirname "$path")
filename_clean="${filename//+([^[:alnum:]_-\.])/_}"
if (test "$filename" != "$filename_clean")
then
mv -v "$directory/$filename" "$directory/$filename_clean"
fi
done