Archive for Oktober, 2012

kernel-clean

Montag, Oktober 22nd, 2012

On Debian/Ubuntu it happens that old kernel packages accumulate with the regular updates. Those use up a lot of space (about 100MB per version). Removing old, unused kernels manually is a boring task, that’s why I wrote a script: kernel-clean. It checks for the currently running and the newest installed kernel and removes all others.

Get the code on Github: https://github.com/plepe/kernel-clean/

__FILE__ in JavaScript

Montag, Oktober 15th, 2012

Many programming languages provide a magic __FILE__ variable which holds the path to the currently executing file. JavaScript unfortunately don’t. Using several sources, I implemented a __FILE__ variable for JavaScript. Unfortunately it does not work in all browsers, especially not in Internet Explorer and Safari. There seems to be a possibility for IE10, but lacking a Windows 8 machine I can’t test it. If you find a way for these browsers or other improvements please contribute your code.

Here’s the source code: https://gist.github.com/3891980

Sources I used for this GIST: