Category: Code Snippets

Code Snippet: Updated use of Google suggest for keyword research

In 2010 I posted an article about using Google suggest for keyword research. Google changed some things, so I updated the code to make it working today with some additional optimizations. Unfortunately Google does not provide the number of search results in the XML anymore, so that there are only the search phrases available. Nevertheless […]


Continue reading »

Code Snippet: Simple typewriter class for javascript (no plugin needed)

Today, I wrote some simple javascript class for writing text like a typewriter in a HTML document container. The class runs without any plugins and should be usable in any browser. If you have problems unsing it, please let me know in the comments. The only thing you have to do is implement a HTML […]


Continue reading »

Code Snippet: mysql_fetch_assoc in Python

Unfortunately the mySQL connector library for Python has no function like mysql_fetch_assoc known from PHP where you can fetch data from the database into an associative array. I needed that function for one of my actual projects, so I decided to write it on my own and share it, so that it maybe helps someone […]


Continue reading »

Code Snippet: Getting variables in python with a defined size of bits

For a new project I needed to do some low level programming in python in which I needed data types with a defined size of bits. Normally python organizes the size of your variables, so that you cannot make your variable a defined 8bit , 16bit, 24bit, etc. integer, but with some bitwise operations you […]


Continue reading »

Code Snippet: Keep Alive check for servers

When you want to test out if your webserver configuration currently is supporting Keep-Alive requests and how it’s responding them, there are several ways. You could use Firebug, Chrome Developer Tools or you could use benchmarking tools like “ab” (ApacheBench) and so on. For me “ab” was always a good choice, but I seem to […]


Continue reading »

Simple 2D animation in HTML5 canvas

article-image

I needed some animation for E.A.T., so I tried a little bit around with animations in the HTML5 canvas element and want to share some simple code with all of you wanting to know how animations in a canvas work. The example will use image sprites for the animation width a width and height of 48×48 […]


Continue reading »

Simple HTML5 snowflakes in canvas

article-image

Today, I thought about HTML5 and the canvas element again. Escape is a bit “on ice” at the moment, because some other ideas bothered me too much and so I decided to test other things. A few months ago, I already did some image manipulation and screen scrolling with a canvas, but now I wanted to […]


Continue reading »

Code Snippet: Youtube playlist downloader

article-image

A few months ago, I wrote a tiny ruby script I never released, that made it possible to download Youtube playlists and convert them to mp3 files. Unfortunately Youtube changed many things since that time and my script did not work anymore. Private reasons and a strong will to fight the API forced me to […]


Continue reading »

Code snippet: Export simplenews subscribers from drupal to CSV

article-image

Some of you may know the newsletter module simplenews for drupal. If you’ve ever tried it, I am sure you soon realized, it’s a mess. The template functionality is too complicated and poor, emails are send via cron, you have no statistics and only poor ones with other extending modules…


Continue reading »

Code Snippet: Making a HTTP GET request with ruby

I had to get into some ruby programming for my job and so I decided to refresh my memories a bit more. It became more or less a tradition of mine to write some network or internet code to get into a language and so here’s a first result. It’s just a simple function for […]


Continue reading »