Posts

Showing posts from June, 2017

Running C++ in a browser

Image
If you are a c/cpp developer and want to run your code on a web, in browser there is a solution for you. First make sure that you code is portable ie.: can be compiled on multiple platforms. Then you can use a compiler called Emscripten that is capable to output asm.js compatible javascript code or webassembly code. Sounds good? There is more if your code uses OpenGL ES it will cross compile that to WebGL. Setting up the actual enviroment is a breeze as there is a docker container for that on docker hub.

Enable haproxy stats page

I used the following config values with tthe HAProxy 1.7 docker image to enable the statistics page. listen stats bind :2016 stats enable stats hide-version stats realm Haproxy stats uri /ha-stats stats auth admin:password  This will bind to port 2016 on your host and will reqest the username and password specified.

Detecting available java heap space in a contaner

Did you know that java before update 8u131 would ignore your container memory limit and simply would calculate heap size from the host memory size? Carlos Sanchez has written an excellent post about the subject. Please follow the link to his site to read it. Running a jvm in a container without getting killed.