Tech-savvy

Automatically create genre playlists of your music collection

Sunday, March 3rd, 2013 | Linux, Tech-savvy | No Comments

This script will create playlists based on the tags of your mp3 and flac files. Prerequisites: id3v2/metaflac command line tool (sudo apt-get install id3v2 metaflac) and tagged mp3/flac files.

Note: The id3v2 command only works up to version 2.3 of the id3v2 spec (which is pretty much the default), so this script will not work on v2.4 files. It seems a lot of people still use 2.3 as 2.4 does not give a lot of advantages and 2.3 is way more compliant with mp3 playback devices. I just came across this issue because I use EasyTag for tagging and this tool writes v2.4 by default. After setting EasyTag’s prefs to v2.3 I was good to go :)

#!/bin/bash
 
# set extraction command chain for each file type
EXTMP3="id3v2 -l \"_FILE\" | sed -n \"s/TCON (Content type): \(.*\) (.*)/\1/p\""
EXTFLAC="metaflac --show-tag=GENRE \"_FILE\" | sed -n \"s/GENRE=\(.*\)/\1/p\""
 
# delete old playlists
rm *.m3u
 
function createPlaylist {
  while IFS= read -r -d '' FILE; do
    echo Processing \"$FILE\"
    GENRE=`eval ${2/_FILE/$FILE}`
    if [ "$GENRE" ]
      then
        echo "$FILE" >> "$GENRE.m3u"
    fi
    echo "$FILE" >> "All.m3u"
  done < <(find . -name "*.$1" -print0 | sort -z)
}
 
createPlaylist mp3 "$EXTMP3"
createPlaylist flac "$EXTFLAC"

Basically we loop over all files and extract the genre’s nice name using a file type specific chain of commands. If a genre is found the file name is appended to the playlist that is named like the genre itself. Additionally an “All” playlist is created that holds every file found, even the ones that have no genre set.

Tags: , , , , , , , ,

“fast” JIRA and Confluence setup on a small VPS

Sunday, January 6th, 2013 | Linux, Tech-savvy | No Comments

I recently stumbled upon my old “fast firewalling for developers with iptables” blog and also read the comment (yeah, one!) asking how to go on from here, maybe set up JIRA and Confluence from Atlassian really fast. So here we go. We will install JIRA and Confluence using MySQL as the database, allowing only HTTPS connections. Bear in mind that this is not an enterprise setup, it’s again targeted at individuals who want to run these tools in a non-critical private small VPS environment maybe to evaluate the tools or collaborate with a friend. This is going to be easy and straightforward, no fancy admin stuff, no over the top security, simply getting the stuff up and running.
› Continue reading

Tags: , , , , , , , , ,

Setting up my electric guitar (the fast way)

Sunday, December 30th, 2012 | Gadgets, Tech-savvy | 1 Comment

My e-drum set-up took me a day (@see previous post). The (preliminary) guitar set-up less than 5 minutes. I simply had to whrock fast.

Guitar setup

Tags: , , , ,

Building a “silent” e-drum platform

Friday, December 28th, 2012 | Gadgets, Photography, Tech-savvy | No Comments

When I am not busy working my immaterial day-job I like to fiddle with handicrafts. This time I wanted to build a platform that decouples my new e-drum set from the concrete floor for reasons of noise reduction and neighbour amity. First, it was just plywood elevated by layers of bubble wrap, but then I fancied some power outlets and light. I am pretty happy with the looks of the outcome, even though I guess it’s not significantly less noisy :cool:

Tags: , , , ,

Bash history at your fingertips as seen @coderwall.

Thursday, December 13th, 2012 | Linux, Tech-savvy | No Comments

The single most useful thing in bash #protip https://coderwall.com/p/oqtj8w via @coderwall

Create ~/.inputrc and fill it with this:

"\e[A": history-search-backward
"\e[B": history-search-forward
set show-all-if-ambiguous on
set completion-ignore-case on

This allows you to search through your history using the up and down arrows … i.e. type “cd /” and press the up arrow and you’ll search through everything in your history that starts with “cd /”.

Props go to Jude. Thank you very much for this. Upvote done.

Tags: , , ,

GarageBand is in da house!

Thursday, November 22nd, 2012 | Gadgets, Music, Tech-savvy | 1 Comment

Needed a space to play music. Set up a working environment. Got an Apple computer. Recorded my fist song.

Flachboot Nandu
. An instant classic ;) I was just making sure all instruments and mics were working properly, the outcome was so hilarious I had to keep and share it.

Tags: , ,

Everyday Life’s Insights II – Keep Keepsakes

Friday, October 19th, 2012 | Activities, Insights, Photography, Tech-savvy | No Comments

I love to keep things. Not in a messy kind of way, rather hanging on to the past. Which is worse is up to you to decide. Anyway, people tend to tell you to get rid of old unused stuff, get rid of all the clutter. So last time I “optimized” my cellar I threw away my somewhat broken Ixus 70 which turned out to be a pretty bad idea.

Someone that is very closely related to me dropped the old camera to the floor. The flash did not fire any more after that stunt. So we bought a new Ixus 500 HS – a decent device but by far not as convincing as the 70 in terms of features, handling and (subjective) image quality.

Anyway, the old one went straight to the storage to RIP. Same goes for my first “New Zealand” Ixus, a 330 from 2002 – what a beauty! :)

So I decided to throw away the beloved Ixus 70 because of a broken flash. A few weeks later I felt the need for a camera that I could take on bike trips – and what do you not need for landscape photography? Correct. A flash. The old Ixus would have been the perfect companion for the purpose. What a bummer.

Bottom line: Keep your stuff unless you are absolutely sure you don’t need it any more. Full stop.

Tags: , , , ,

Goodbye Fedora, Hello Ubuntu

Tuesday, September 11th, 2012 | Gadgets, Linux, Tech-savvy | No Comments

Fedora pretty much blew my mind until recent updates rendered the system unusable. After a kernel update VirtualBox stopped working (had to install recent header files by hand) and my FreeMind had some dependency issues I didn’t even bother to solve. I like to have a system that is as versatile as any modern Linux, yet I need a stable environment as well. So I thought fudge it, let’s give *the* “standard” Linux a try – I installed the recent Ubunutu 12.04.1 LTS and man it rocks! :)

    Ubuntu 12 at a glimpse:

  • Unity is a Desktop Environment that is easy and pleasant to work with.
  • The dash is pretty kewl as well. I don’t know how much I like the tight integration with pretty much everything, but it seems to be a nice concept.
  • Terminals come with a decent colour scheme – may sound petty, yet a sloppy set-up terminal is a major annoyance to me.
  • Ctrl-Alt-T – how come it never occurred to me that a terminal shortcut will make life so much easier?!
  • Ubuntu’s default font is a feast for the eyes – love it!
  • bash history size is already set to 2000 (instead of Mint’s 500) – no need to pimp this one as well
  • ls aliases already present, yet needed some personal flavour tweaking

I have to say that Ubuntu 12.04 has been the most flawless and out-of-the-box experience in quite some time. Awesome!

    Brief post-installation task as a reminder to self:

  • fix vim movement issue
  • echo set nocompatible >> ~/.vimrc

  • hide windoze hdds in nautilus @see http://www.nick-prosch.de/?p=4265
  • fix .local name resolution in /etc/nsswitch.conf if you are on a m$ driven network
  • hosts: dns files mdns4_minimal mdns4

  • we like to be united – my wife and me use the same usergroup and still like to have 002 umasks instead of non-username group’s umask of 022 @see https://blueprints.launchpad.net/ubuntu/+spec/umask-to-0002 for more info
    • all beloved ones shall use the same group
    • sudo usermod -g users username

    • edit /etc/login.defs s/UMASK 022/UMASK 002/
  • install Adblock Plus, Firebug
  • install VirtualBox + extension pack and add users to vboxusers group
  • sudo usermod -a -G vboxusers username

  • install Audacious
  • install TrueCrypt
  • set up ssh environment, keys and the like

I am about to get a new shiny device at work. I am looking forward to see how Ubuntu subsists in every day’s developer’s business. Stay tuned.

Tags: , , , ,

Fedora 17: post installation tasks

Monday, September 3rd, 2012 | Linux, Tech-savvy | 1 Comment

Okay, as promised, my personal Fedora 17 post-installation tasks are:

  1. Change terminal environment
  2. First thing I do is open a terminal and wonder who likes to work on a small piece of paper? This is a terminal, not a word processor. Edit -> Profiles… -> Default, 132×43 size, colour scheme: Gray on black, transparency 10%, Scrollback 5120, done.

  3. Install Adblock Plus
  4. Adblock Plus seems to me like the essential FireFox plug-in in any kind of browsing environment.

  5. Hide unwanted devices in Nautilus
  6. Get rid of windoze partitions and the like showing up in Nautilus. See my previous post on this topic.

  7. Install Fedora Utils
  8. Fedora Utils is a script that lets you install essential (proprietory/closed-source) software. Use it to get access to multi-media codecs and DVD playback or software like Google Earth and Skype. Nice! Save a lot of handiwork. There maz be better alternatives around, but as this is my first Fedora run I cannot say which one does the job best.

  9. Install TrueCrypt
  10. Nice encryption tool. Make sure you disable the requiretty option in the sudoers file for GUI support.

  11. Install Audacious
  12. My favourite Linux Winamp clone. Love it or leave it.

    sudo yum install audacious
  13. Install Nautilus Open in Terminal extension
  14. Fiddling in Nautilus and need a Terminal? Right click -> Open in Terminal. Done.

    sudo yum install nautilus-open-terminal
  15. Install VirtualBox
  16. If you installed Fedora Utils you should already have a current VirtualBox in your repositories.

    sudo yum install VirtualBox

    Download and install the extension pack for USB support.
    Make sure you are a member of the vboxusers group:

    usermod -a -G vboxusers username
  17. Install Thunderbird
  18. Fedora ships with Evolution, I prefer Thunderbird.

    sudo yum install thunderbird
  19. Install Office suite
  20. I guess Libre Office is the suite to go with.

    sudo yum install libreoffice
  21. Install Gimp
  22. What? No Gimp? That@s pretty darn “pure” too me :)

    sudo yum install gimp
  23. pimp Gnome
  24. I only install a bare minimum of Gnome Extensions, namely

    1. Windows Alt Tab
    2. A replacement for Alt-Tab, allows to cycle between windows and does not group by application. First I tried AlternateTab, but that gave a small preview of the window instead of the program’s icon. It can be quite tedious to search for a window’s content rather than an easily recognizable icon.

    3. Native Window Placement
    4. Arrange windows in overview in a more compact way.

    5. Remove Accessibility
    6. Remove the accesibility button from the top panel.

    7. Status Icon Fixer
    8. Fixes Dropbox, Skype, vlc and others into the status bar; not perfect, but ok
      I like this little devil a lot. I used it to fix Audaciuos status icon to appear where I want it to. Edit ~/.local/share/gnome-shell/extensions/status@gnome-shell.2jk.org/extension.js to suit your needs.

  25. increase terminal history size
  26. From a previous post: Remember that wicked command you entered a few weeks ago? No? Increase your history size to something that lives up to the term “history”. Open your ~/.bashrc and enter something like export HISTFILESIZE=10000

I’d like to point out one more time that Fedora 17 ships with working multi-monitor support and vi movements are working out of the box as well, no more echo set nocompatible >> ~/.vimrc needed. I also already encountered a few problems, like VirtualBox no longer working after Kernel update or FreeMind having some dependency issues at some point. I have to say that it seems bleeding edge comes with a few characteristics that render the OS not work-compliant. Maybe next time I’ll go for a plain Ubuntu LTS and hope it just works…

Tags: , , , , , , , , , , ,

Linux Mint 12: More post installation tasks

Wednesday, May 16th, 2012 | Linux, Tech-savvy | No Comments

I started to write down my personal Linux Mint post installation tasks as of version 10. After installing a few Mint 12 machines I had to update the list. As always, highly personal, take whatever info might be useful, ignore the rest.

  1. Add favorite programs to autostart
  2. GNOME 3 has no point-and-click tool to add autostart options, at least no default shortcut for it. Alt-F2 and gnome-session-properties does the trick. I have essentials like my browser, media player and ssh-add in my autostart.

  3. Disable extension overkill
  4. Whether you use MATE, GNOME 3 or Cinnamon is up to you. I kinda like the new GNOME, but not all the default “extensions” that come with Mint 12 extend my user experience in a good way ;) I decided the following options work the best for me:

  5. Install VirtualBox with USB support
  6. Well, installing VirtualBox is a little confusing, as you have multiple versions (virtualbox-ose, -nonfree, -4.1) in your available software list. Some people suggest adding new repos and installing the latest version, I just stick to what’s being delivered by the default repos. Makes me feel better for some reason.

    The VirtualBox site states that the “standard” installation names are the ones with the major version at the end, so I just went for the -4.1 (writing this 4.1.14 is the latest stable, the official Mint repos provide 4.1.6, yeah, whatever…)

    If you want USB support you have to add the appropriate extension pack. Go to http://download.virtualbox.org/virtualbox/ and get it for your installed version. You also have to make all users that want to use VirtualBox members of the vboxusers group. As there is no GNOME 3 default group editor simply open a shell and enter

    nick $ sudo adduser username vboxusers

    Your group memberships will be updated the next time you log in.

    Finally, add USB devices in your VBox config’s USB section (select the desired machine, click “Change”, choose “USB”). After that you should be ready to go. What a drag.

  7. Use the users group as the default group
  8. I share my computer. I share a lot of files, like pictures and stuff. I don’t like that my user – nick – also has his primary group called “nick”. So ownership of files is nick:nick. This makes little sense to me and I’d rather have it like this: nick:users and nickswife:users so that I can easily access the same files as my picture taking wingman. So issue

    nick $ sudo usermod -g users username

    for each user that should have the “users” group as the default group. (The sticky bit approach cd /our/pics; chgrp -R users .; find . -type d -exec chmod 2770 {} \;; find . -type f -exec chmod 660 {} \;was not sufficient for me, by using the same primary group I hope we won’t have any permission troubles in the future again)

  9. Increase history size
  10. Remember that wicked command you entered a few weeks ago? No? Increase your history size to something that lives up to the term “history”. Open your ~/.bashrc and enter something like export HISTFILESIZE=10000

That’s it for today. Have phun!

Tags: , , , , , , , ,

Search

Categories