dracoblue.net

Enable repository for latest puppet on ubuntu

If you try to install puppet on ubuntu 12.04 precise, it will eventually fail like this:

# apt-get install puppet
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 puppet : Depends: puppet-common (= 2.7.11-1ubuntu2.1) but it is not going to be installed
          Depends: ruby1.8 but it is not going to be installed
          Recommends: rdoc
E: Unable to correct problems, you have held broken packages.

The puppet team provides a very easy and convenient way to get the latest version of puppet with apt-get on your ubuntu distribution. This will enable you to install the latest puppet version (3.x at the time of writing).

Continue reading ...

In open source, puppet, ubuntu by DracoBlue @ 2013-12-21 | 243 Words

Automated Tests for your @example Code Tags

When I am working on craur, I try to keep every method well documented.

I define well documented in such way, that I don't document things, which php already knows (e.g. parameter count, type hinting, etc) or which are obvious when looking at the signature (e.g. type for parameter called: title).

One thing I tend to document, are examples (with @example-tag) how the code is useful. Let's take this example for the createFromHtml method in craur:

Continue reading ...

In java, javascript, open source, php, ruby, unit tests by DracoBlue @ 2013-12-17 | 311 Words

Fast clicktracking with nginx logs

When your web site is static (generated upfront or cached in varnish/nginx), you cannot update view/hits/download counters on each request. This click tracking needs to be done with additional requests.

Let's say our download urls look like this:

http://example.org/download-file/craur/craur-1.2.0.zip
Continue reading ...

In linux, nginx, open source, ubuntu by DracoBlue @ 2013-12-13 | 284 Words

Running static blog with nginx

If you created your blog without php/ruby (e.g. with jekyll or middleman, you need a webserver to serve the page.

If you host it with nginx, this is a very basic template:

server {
    listen               *:80;
    server_name          example.org;

    gzip             on;
    gzip_min_length  1000;
    gzip_types       text/plain application/xml application/json text/css application/x-javascript;
    gzip_disable     "MSIE [1-6]\.";

    root   /home/example/live/_site/;

    index index.html;
}
Continue reading ...

In jekyll, linux, nginx, open source, ubuntu by DracoBlue @ 2013-12-12 | 227 Words

Compile SAMP Scripts with pawncc.exe on linux

If you want to create scripts for San Andreas Multiplayer, you usually compile them on your windows PC.

But since you might want to automate it on a linux machine (e.g. to test your scripts on travis-ci), the pawncc.exe won't run on linux out of the box.

I am aware of the fact, that the team of the pawn language provides a native linux compiler called pawncc on their website, but the resulting .amx files do not work with the samp server.

To get our ubuntu linux box ready for compiling samp pawn scripts, we need some essentials.

Continue reading ...

In linux, open source, pawn, samp, ubuntu, wine by DracoBlue @ 2013-12-11 | 432 Words

Page 9 - Page 10 - Page 11