A few days ago i reactivated my blog and decided to switch from Wordpress to Jekyll. After I had solved most problems regarding the migration, I had to think about my new publishing process and the major issue I had to face was the preparation of my images. Wordpress scaled my images and reduced the image quality for me, now I have to do this on my own.
To do this, I have written a small script that checks the width and height of a given image and scales it down and reduces its quality. This script internally uses two commands of the ImageMagick software suite, the identify and convert command. While identify allows me to collect all important information about a given image, convert enables me to convert the image to another image format, scale the image and reduce the image quality.
A few days ago I faced some issues with lightdm after upgrading my system. A quick fix was to switch to GDM. However, after switching to GDM my .Xresources wasn’t load at boot. A quick look into /etc/gdm and I found the Xsession configuration file, which included the following code:
xrdb Manual: -nocpp This option indicates that xrdb should not run the input file through a preprocessor before loading it into properties.
This means that my .Xresources configuration was loaded, but the includes were not executed because no preprocessor was used. So the GDM maintainers hoped to improve performance by using the -nocpp flag. So to fix this issue I just had to remove the flag and my XTerm styles were loaded.
Hope this will help you. Until next time: Stay geeky!
I love cheat sheets. A good cheat sheet decorates your desk and presents its content in a simple and understandable way. And a perfect cheat sheet presents its content also in an entertaining way and is called Cheat Cube. Cheat Cubes are awesome. It decorates your desk and serves as a toy, while waiting for a download to end, a game to load or a compiler to finish its process. And as a pleasant side effect, you learn some new stuff, you can benefit from in your daily life.
However, I was looking for a weekend project and decided to write my first Inkscape Plugin that simplifies the creation of Cheat Cubes and I ended up with Cubify.
Once upon a time, there was a computer science student blogging about all that stuff that comes to his mind … Yeah, it has been about a year since my last blog post and I apologize for that. However, I would like to share some experiences with you that I gathered during one of my projects, namely home automation using the Raspberry Pi.
In this post I will show you how you can setup the GPL’d perl server for house automation, fhem, on your Raspberry Pi or an other single board computer, like the Beaglebone (Black), Bananapi or Gooseberry, running the one and only Arch Linux distribution. Finally I will give an example of how you can use fhem to control HomeMatic or other home automation components. So lets get started with the Arch Linux setup.
At the beginning of my studies at the university of Göttingen I was very interested in micro electronics. From this period I still own numerous electronic components like LCDs, GPS receivers, many different sensors and a camera module. While accessing the GPIOs of the Beaglebone in order to light an LED or to request the value of a sensor is pretty easy, accessing a camera modul or a LC Display is not that simple. That means, that I have been consistently concerned with the different interfaces of the Beaglebone Black during the last few weeks. Meanwhile I freshed up my knowledge about the Qt development suit, the OpenCV computer vision library and different C/C++ libraries that are used to controller camera modules or LC Displays.
However, last week I started to setup Arch Linux on my desktop and I faced some problems while trying to get the cups PDF printer up and running. Thus, I was not able to export my pen and paper character to a PDF file, which I could then send to my tablet in order to take it to the games evening with my friends that night. Fortunately, there exists this great tool, ImageMagic. It is not only able to convert from one image format to another using the convert command, but also to concatenate several images to one single PDF file.
A few days ago I received my new HTC Desire C that I purchased on ebay for just a few coins. When I received it, it was flashed with the standard Android JellyBean (4.1.2).
Let’s get started. Most distributions have packages for ADB and Fastboot in their repositories, but because they are in most cases out-of-date, I recommend to install these tools by installing the Android SDK directly. So start downloading the latest Android SDL. During the download you should ensure that no system packages of ADB and Fastboot are already installed. Since I am running a Debian Wheezy on my desktop, I could remove such system packages by executing the following commands:
The last few days I was very busy and had no time to hang out or write a blog post. Nothing changed, I am still busy, but here are a few tips on how you could list all responding IP addresses within your network.
Today I had to figure out which IP address the DHCP server assigned to the weather station I connected to the internal network, so I could connect to it using the web interface of the station. Therefore I wrote a small bash script which receives a net address with the last number replaced with an asterisk:
Save this script to listHosts.sh. If you would like to list all hosts of the internal network 192.168.1.*, just enter the following line within your terminal:
However, this will take some time and will either return a list of available host or prompt “No hosts in this net.”. A much faster way to do this is using the arp command:
This will display all reachable hosts with the prefix of your net in the alternative (BSD) style.
Hope this will help someone. Until next time - Happy scripting!
The generation of reports is part of the daily business for everybody, who participates in a development or research team or works as part of a sales force team. You always have to report your current project state, your latest updates and fixes or the sales and order intake of the last quarter as well as the forecast of the coming quarter. Most of this reports always consist of the same graphs, texts and forms and could therefore be generated using something like a template. In other words they could be generated completely automatically if the data that changes over time is stored in something like a database.
Imagine a smaller web shop you are running. To get a better feeling of whether the shop is profitable or not or to check the response to a marketing campaign, you have to monitor your business. Thus, a report that contains some statistics about the evolution of your daily and/or monthly sales, as well as the analysis of the targets defined in the forecast, could help you to improve your marketing strategy.
However, I am a computer scientist and do not care about those stuff, but I am the one to ask how to automate things. And that is what I did to monitor different things, like my Flattr and Wordpress account, as well as the monthly power consumption of different house electronics at home. The range of applications is enormous, if you just think about it for a moment.