Quantcast
Channel: Milian Wolff Code Snippets
Browsing latest articles
Browse All 12 View Live

Access klipper clipboard on CLI under KDE4

NOTE: find most recent version on github: https://github.com/milianw/shell-helpers/blob/master/clipboardHere’s a little script you can save in your path and do things like# paste current clipboard into...

View Article



Download script for springerlink.com Ebooks

After a long period of silence I present you the following bash script for downloading books from http://springerlink.com. This is not a way to circumvent their login mechanisms, you will need proper...

View Article

Take 2: Download script for springerlink.com Ebooks

NOTE: This script is apparently against the licensing contract between universities and Springer, see: http://www.bib.hm.edu/aktuelles/news/newsdetail_9984.de.htmlNOTE 2: I do not maintain this script...

View Article

Attack of the shell helpers

Everyone who uses the command line regularly has a bunch of (at least for him) useful helper scripts. I now took the liberty to put mine on github for general consumption.You can find them at:...

View Article

Shell helper: running KDE unit tests (ctests) the easy way

Unit tests are in my eyes a very important part of programming. KDE uses them, KDevelop does - the PHP plugin I help writing does as well. cmake comes with a ctest program which does quite well to give...

View Article


Qt: Tint alphatransparent PNG

Let’s assume you want to display the logo of your company in your Qt app. Most probably that logo has just single color with an alpha channel.But: Having the color hard coded in the image is not nice,...

View Article

Image may be NSFW.
Clik here to view.

Tracking Memory Consumption Using Pmap

Massif is a really nifty tool which is very powerful, especially paired with my visualizer. The caveat of course is that it slows down the application considerably, I’ve seen anything up to a factor of...

View Article

Image may be NSFW.
Clik here to view.

Git commit message highlighting in nano

For those who use nano as their CLI editor of choice: Here’s a syntax highlighting file for Git commit messages which also supports the special KDE commit hook keywords.## syntax highlighting for git...

View Article


Maxwell distribution in C++11

Hey all,I recently needed to generate values following a Maxwell distribution. Wikipedia gives the hint that this is a Gamma distribution, which in C++11 is easily useable. Thus, thanks to...

View Article


A git hook to prevent pushes with untracked source files

Hey all,do you know this: You work on something locally in git, ensure everything compiles and the tests pass, then commit and hit git push.What could possibly go wrong at that point, eh? Well, far too...

View Article
Browsing latest articles
Browse All 12 View Live




Latest Images