Samstag, 28. März 2015

Capturing packets on FritzBox routers

Although I've been quite content with my FritzBox routers, I always wanted more information about the actual packets it's receiving and transmitting. Unlike e.g. Astaro routers, FritzBoxes don't have a nice UI that gives you real-time information about the packets it's filtering etc.

Today, I stumbled upon a Sonoya article that describes how you can enable packet capturing on your FritzBox and download the capture in Wireshark format. In essence:

- log in to your FritzBox
- open http:///html/capture.html
- start the capture
- stop the capture; this automatically downloads the capture file

Sonoya article: http://www.sonoya.com/tutorial-netzwerk-datenverkehr-mit-fritzbox-aufzeichnen.html

Samstag, 14. März 2015

Running the "League of Legends" client on Mac OS X

My kids've been pestering me because they wanted to play "League of Legends" on my old Mac for quite some time now. So I thought "Let's download the client and run it - shouldn't take more than a few minutes".

Boy, was I wrong.

On startup (after completing the usual registration process), the client started downloading a whopping 2GB of data. I thought "Oookay. Apparently, they've done a major upgrade right now. So we'll download this once and then we can run it".

Boy, was I wrong.

After the download was finished and we restarted the client, it started downloading another 1GB. I thought "This is getting ridiculous, but what the heck. Surely, this will be the final download".

Boy, was I wrong.

After successfully downloading it and restarting the client, IT STARTED DOWNLOADING AGAIN. WTF?

Now I started thinking (I know, I should have done more of that in the first place...).

Was it possible that in 2015, a game could still require an Administrator account to run properly?
For testing purposes, I logged in using my own (Administrator) account, re-downloaded the installer, went through the initial 2GB download, restarted it, and lo and behold - it worked!

But since giving the kids access to my account is a big no-go, I bit the bullet and
- transferred ownership of the game to them: chown -R League_of_Legends.app
- told them that whenever the game tries to upgrade itself and fails, they should call me

IMO, this is totally unacceptable. Either the people at Riot Games (the makers of League of Legends)  are completely incompetent or just incredibly lazy. Either way, this sucks.


Sonntag, 1. März 2015

Elm: unexpected '|', expecting whitespace or end of input

I recently bought "Seven more languages in seven weeks" (E-Book). I really love the "Seven .. in seven weeks" series - it's intense + challenging + mind-bending.

However, one of the things that was driving me crazy was that this simple piece of Elm code:


type Color = Black | White

generated this error:

unexpected '|'
expecting whitespace or end of input

After trying out various things, the solution turned out to be quite simple - change your Terminal settings to use ASCII instead of Unicode-8, and everything works as expected (you might want to ensure your editor of choice also uses ASCII encoding if you're not using the REPL).

Happy coding!

UPDATE
Turns out the solution wasn't related to the character encoding - it seems to be a bug in the ELM REPL where it doesn't recover once you've typed in something wrong:

franks-air:~ frank$ elm-repl
Elm REPL 0.4
Type :help for help, :exit to exit
> data List = Empty | Node Int List

Error in repl-temp-000.elm:

Parse error at (line 2, column 19):
unexpected '|'
expecting whitespace or end of input


> type List = Empty | Node Int List

Error in repl-temp-000.elm:

Parse error at (line 3, column 19):
unexpected '|'
expecting whitespace or end of input


franks-air:~ frank$ elm-repl
Elm REPL 0.4
Type :help for help, :exit to exit

> type List = Empty | Node Int List
>