Home » Articles posted by Christiaan Kras (Page 6)

Private Wiki – DokuWiki on Lighttpd

I had planned on setting up a private Wiki to use as a personal clipboard collection of useful snippets for some time now but never got around to it. This week I decided it was time to get it done and so I started searching for Wiki software. I ended up trying MediaWiki but ran into installation issues due to PHP’s session.save_handler not being set. After changing it I ran into more issues and with MediaWiki unable to store session data I couldn’t proceed. I’m not sure why MediaWiki requires this setting though as I run several WordPress websites and some other PHP code as well and they’re not having this issue.

Moving on I found out about DokuWiki which is really easy to install! Simply download the package, extract it and you’re done! It doesn’t require special database software such as MySQL – it stores pages on disk. Zero hassle and easy to use as well!

Since I’m not using Apache I can’t use .htaccess files. DokuWiki has a couple of folders which should not be exposed to the outside world. For Lighttpd my configuration looks like this:

$HTTP["host"] =~ "^wiki.example.com$" {
    server.document-root = "/home/example/wiki.example.com/httpdocs"
    # deny access completely to these
    $HTTP["url"] =~ "/(\.|_)ht" { url.access-deny = ( "" ) }
    $HTTP["url"] =~ "^" + "/(bin|data|inc|conf)/"  { url.access-deny = ( "" ) }
}

And you’re all set!

New Year’s resolution: Buy Less Games

I’m a gamer. And so as a gamer I tend to buy games on a regular basis. Looking back at 2013 I personally think I overdid it a bit… The first six months of 2013 weren’t too bad actually. I bought maybe 4 games or something. In went downhill the second half of 2013 though…

At the beginning of the year I had decided not to buy any new games because my backlog was too big – how I manage my backlog will be covered in another post. But hey, who can resist a good bargain?

In March I bought a used PlayStation Vita. I bought it because it was really cheap and since I already have PS Plus for PlayStation 3 it would mean ‘free’ games every month. The moment Sony started with PS Plus for PS Vita I have added the games to my list so I already had quite a few games for that device. For the Vita the year wasn’t too bad when it comes to buying games. So far I’ve only bought ModNation Racers: Road Trip and Killzone: Mercenary. The rest of my PS Vita games come from PS Plus.

But a few months later I bought a Wii U for a really nice price at that time. I really like the console and think Nintendo should receive a lot more credit for it and for the games as well. So with the Wii U as a new console some more games started coming in.

Somewhere starting September till the end of the year games are put on offer a lot and for ridiculous low pricing sometimes as well. And thus the power to resist gets to an all time low level. I’ve mostly focused on getting some Wii U games, only bought 4 PlayStation 3 games (which 3 of I’ve yet to play) and a number of Xbox 360 games. Then come the bundles for PC. You know, those where you pay a few bucks and get like 6 games. I mostly buy these only because there are one or two games I’d like, but it does add to the backlog. Oh yeah, I also bought a Nintendo 3DS XL for a really low price. And what’s a console without games? Boring, so I got 2 games for that as well.

During 2013 I made use of a GoalTracker app that would let me track positive and negative goals. Positive goals are things like going to the gym, negative for me would be buying a game. Because that app has a bug which causes it to stay stuck in the year I started it I no longer keep track of these things (I do for some, but with another app). Total amount of new games in 2013: about 41. And that doesn’t even include those gotten for ‘free’ through PlayStation Plus and Xbox version Games With Gold.

My backlog currently consists of 135 games I’ve got yet to play. I’m busy playing about 22 different games – not at the same time, they’re in Doing list for as long as I’m interested in finishing them. And my wishlist has about 93 games on it… I blame the length of these lists on PlayStation Plus, Xbox’s Games With Gold and the Steam Summer Sale in 2012. And my own weakness of course :-).

For 2014 I plan on not buying a game for a console unless I’m all done with the games I’ve got for it. I will make a couple of exceptions though! A game like Final Fantasy X/X-2 HD Remaster and Final Fantasy XIII-3: Lightning Returns will be bought regardless of how many games I’ve got left to play. But that’s about it. I swear!

The positive part about all this is that I did actually finish quite a bunch of games in 2013. I just bought more than I could handle :-P. But this year will be different, just like 2013 was supposed to be!

Help beta test an HTML2PDF Web Service

In an earlier post I asked if anyone would be interested to help me out test a web service for converting HTML to PDF. Today I’m opening up the beta to anyone that’s interested.

Please visit https://html2pdfwebservice.com/ and sign-up for a 7-day trial account. No credit card required! Trial length can be extended upon request.

Converting HTML to PDF is easy with the HTML2PDF Web Service. Here are some examples:

cURL

$ curl -H "X-API-Key: F8802062-4D31-11E3-8F59-BFD4058B6BFF"
       -H "X-API-Username: MyUsername"
       -d '{"content":"<html><head><title>My page</title></head><body><h1>Hello World!</h1><p>I am an HTML page converted to PDF!</p></body></html>"}'
       https://html2pdfwebservice.com/api/convert > page.pdf

Perl

#!/usr/bin/env perl
use strict;
use warnings;
use Mojo::UserAgent;

my $ua = Mojo::UserAgent->new;
my $tx = $ua->post(
    'https://html2pdfwebservice.com/api/convert' => {
        'X-API-Username' => 'MyUsername',
        'X-API-Key'      => 'F8802062-4D31-11E3-8F59-BFD4058B6BFF'
    } => json => {url => 'http://domain.com/invoice.html'}
);
if (my $res = $tx->success) {
    my $pdf_data = $res->body;
}

Ruby

require 'net/https'
require 'uri'

uri           = URI.parse('https://html2pdfwebservice.com/api/convert')
https         = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
# In case the SSL certificate isn't accepted
https.verify_mode = OpenSSL::SSL::VERIFY_NONE

req = Net::HTTP::Post.new(uri.path)
req['X-API-Username'] = 'MyUsername'
req['X-API-Key']      = 'F8802062-4D31-11E3-8F59-BFD4058B6BFF'
req.body              = '{"url": "http://domain.com/invoice.html"}'

res = https.request(req)
if res.code == '200'
    pdf_data = res.body
    # - or write to file -
    # File.open('invoice.pdf', 'w') { |file| file.write(res.body) }
end

PS: Prices are subject to change. During the beta you can’t use your own credit card for payments since we’re still running in sandbox mode. All data will be wiped after the beta ends. Expected launch date will be some time in January 2014.

HTML2PDF Web Service - Convert HTML to PDFUsing HTML2PDF Web Service you can design in HTML and CSS, and convert the resulting page to PDF. Free trial available!

Quick impression of Rocksmith 2014

A little bit over a year ago I purchased the first Rocksmith on PC to get back into regular guitar playing. In the end I’ve only spent about 13 hours playing it. Not nearly enough to really get through some songs though I did master a couple of them. The reasons I didn’t invest more time in it were due to sound lag issues, the confusing interface (the fretboard is displayed with a slightly angled view), practicing a song was difficult, bad detection (power chords always failed for some reason) and having to play the songs that the game decided was a pain as well.

So I was a little weary of buying the latest Rocksmith 2014 game. For good reasons if I say so myself. But the stuff they showed at E3 such as the session mode and riff repeater made me decide to get it anyway. One very nice thing is that all the DLC you bought for the first Rocksmith can be used in the 2014 edition.

I’m liking Rocksmith 2014 a lot more than the first game. The riff repeater is a great tool that helps you master a riff. You can adapt difficulty and speed so you can gradually master a riff. I’ve done this before with Guitar Pro using the loop-feature and tweaking the speed. But with the variable difficulty setting Rocksmith 2014 makes you learn core notes of a riff first and every time you have a perfect run it increases the difficulty which adds more notes. With difficult parts what helps for me is to turn down the speed to around 80-85% with difficulty at 100%. Then after a couple of runs I crank it all up to 100% and try that.

When playing a new song it starts at an easy level and it gradually increases the difficulty if you’re doing well. This feature was available in the first Rocksmith as well but as far as I can tell all I could do is change the difficulty back to very easy to the highest level. Not really great when trying to learn the song.

I’m only 4 hours in and have almost mastered Bring Me To Life by Evanescence (I’m at 99.7% or something). And with Wheels by Foo Fighters I’ve already been able to master a part of the solo and some other parts. With the first Rocksmith I couldn’t really get anywhere with it.

In the few hours I’ve played I’m liking Rocksmith 2014 a lot more than the first game and will try to play more frequent (daily?) now. I try to play the guitar at least 3 times a week, but never learn anything new. With Rocksmith 2014 I’m finally learning new stuff again. Such as pinch harmonics, which so far have proven to be challenging :-).

Monkey re-branded to Monkey X and comes with Desktop target

Monkey by Blitz Research Ltd has been re-branded to Monkey X. Monkey X focuses on multi-platform and multi-device game development. Monkey code translates to the language used by the platform. Javascript for HTML5 games for example and C#/XNA when targeting Xbox 360. Supported platforms are Windows, Mac OSX, Linux, Flash, HTML5, iOS, Android, WP7/8, Xbox 360 and more. Ouya as well!

With the re-branding also comes a new free version. Before, the free version only supported the HTML5 target but now also includes the desktop target. Other targets can be acquired by purchasing a Monkey X Pro license.

Now that the desktop target is freely available as well I think I’ll go give Monkey a try soon. I haven’t used BlitzMax in ages (and I consider it a dead end as well) and since Monkey is very similar to BlitzMax I don’t expect too much trouble to get adapted to it.