marcelpetrick

Replace the Sansa Clip (Clip+ or Clip Zip) firmware to make it scrobbleable

Written by  on May 3, 2015

Work of 5 min (?)
Maybe even less if you know how to handle a mouse, the keyboard and a browser … 😉

First step is to exchange the firmware with Rockbox. A very good OSS mp3-player software for several different device kinds which enhances the hardware. You can even play Doom on your player!

  • set the device to MSC-mode (MTP or Auto does not work)
  • get the firmware for you device: Firmware thread at the Sansa-forums
  • get and run the rockbox-installer
  • select device and mount-point; pick the firmware-binary; select your options (bootloader and firmware yes; no games, no themes, no fonts …): “finish”, doneScreen Shot 2015-04-21 at 10.09.09

The second step is to enable scrobbling:

  • got to your players settings (after restarting it and select “Settings > Playback Settings > last.fm log” with “enable”)

Play some tunes and afterwards connect you device to the PC and run QTScrobbler (note: Qt not QT! We are not in a hurry ;))

Qt Linguist: Extract all new strings

Written by  on April 30, 2015

Task to achieve is: get all the new strings from the project, but the target user does not want to use Qt Linguist!

0. run lupdate (like always)
1. run

Remove multiple newlines from a file

Written by  on April 29, 2015

===========================
Warning 20150507: Just noticed, that the sed-expression also filters identical “not empty” lines from you file! This is not what I wanted. So if you have code with array-initialisations which use the same lines or multiple consecutive calls of the same function, then be careful and check the result of the following command with diff!

Hint 20150508: take a look at this code-snippet. Just copy&paste&compile&run.
===========================

Task to achieve is: remove the superfluous double or triple empty lines between functions. One empty line as separator is acceptable. Two are annoying ..
Workflow is: filter the original source-file and put it into a new file. Remove the old one and replace it.

Maybe I should put it into a shellscript which parses the given directory recursively and applies this to all *., *cpp, *.hpp ..

stats for the masses pt. II: gitstats

Written by  on April 9, 2015

To appraise the tenth anniversary of Git, I want to introduce another tool for measuring the performance for whole repositories: gitstats.
I ran it over quite huge repos and small ones, precompiled for Linux and self-built for OSX and its capabilities and output are really nice. You can even truncate certain timeframes from the visualised data, etc. Output is HTML.

For a small example I ran it over one upcoming project – since I am the lone contributor, some graphs are really lonely.
External link <- can be down.

Tell OSX to search in the current folder by default

Written by  on April 9, 2015

This is one of the most annoying things I encountered while working with OSX: you start filtering the current view and then notice the system is including the whole Mac into the search. Then you click on “<current foldername>” and fixed it. For now, not forever!

Fixable forever by picking “Search the Current Folder” in “Finder > Preferences > Advanced”

finderPrefs

useless data pt. II

Written by  on March 28, 2015

If you ever wondered how many times you compiled your project {today, the last week, ..} and got no answer: here is a clue.
Add the command “date >> someTextFile.txt” as custom command to QtCreator as build step before make is executed.
This will insert everytime you compile a new line with the current time into a textfile. Processing that data is your own task.
Small hint: if you are lazy and just want some alltime-stats use “wc compileDates.txt” 😉

compileRuns

Edit 20150407:
If you are just interested in the date, use this:

Get an overview which SilverFast8-version was used to process your photos

Written by  on March 26, 2015

It is very interesting to see which SilverFast8-version was used for scanning and processing the photos you have digitalized.
The following crude bash-chain-command relies on the GNU-tools, exiftool and some intermedite files. It is not sophisticated or using any syntactic sugar: it just works*.

(* means: has a lot of improvement-potential)

abilities:

  • checks for exiftool first: if not available (missed the installation?), then abort
  • checks all original SF8-output-types: tif, jpg, jp2 and dng
  • searchs stupidly for the “Software”-tag; if other software touched the files that can be missing
  • collects the data into files “versions.txt” and “uniqed.txt” which are not deleted after the run!

example output:

ps. Just noticed that SF6-files are also checked correctly.

stats for the masses: gitinspector

Written by  on March 24, 2015

I am always quite fond of statistics.
Sometimes there is a feeling that the pace of the project is slowing down, but in fact bigger changes take more time and therefore ‘look’ sluggish. But with some real analysis tool you can verify or invalidate this. Never underestimate the truth rock-hard data provides.
The downside is: is someone tweaks his output, because he is aware of the measurement, the stats can be distorted.

tl;dr

gitinspector is a Python-script which creates some output about the authors, their activity, .. as command-line-message or even HTML.
Easy to use (download, extract, run) and versatile.
I can’t provide any useful example-output, because for most of my repositories I am the sole author.

CHDK or “upgrade your old digital camera with new features”

Written by  on March 11, 2015

Canon Hack Development Kit is an alternative firmware for a lot of Canon cameras licensed under the GPL.
I decided to upgrade my fairly outdated 6 MegaPixel “Canon Ixus800” because the new “live view histogram”-feature sounded quite promising. Also: why not testing: loading and running scripts; like for motion detection(!); RAW-output; ..?

Installation was quite simple:

  • format the SD-card via the camera’s menu (of course: backup your old pictures/videos 😉
  • download; extract and copy the needed files to the root of the card via PC: URL
  • restart Ixus800, go to “Play”-mode; press “up” then “upgrade firmware” and confirm
  • done … wow … another great project. Kudos to all contributors!

Qt-inheritance: hitting rock bottom

Written by  on February 26, 2015
  • missing semicolon
  • missing Q_Object
  • missing “public” for the inherited class
  • ctor/dtor private ..