Mapping sockets with users in socket.io

When we began to integrate socket.io into an existing application we were wondering.. We have User objects, each of them can have multiple sockets due to multiple browser tabs. We have Accounts that are basically a collection of Users ..how do we map the sockets properly to the account…

Finding memory leaks with xdebug

Fatal error: Allowed memory size of * bytes exhausted (tried to allocate * bytes) Install xdebug $ sudo pear install xdebug Add the following to the php.ini of the site to analyze xdebug.profiler_enable=1 xdebug.auto_trace=1 xdebug.trace_output_dir=/home xdebug.show_mem_delta=1 xdebug.trace…

MongoDB noSQL injection defense

After recently watching this very interesting DefCon talk I wrote a little CoffeeScript snippet for my node.js / MongoDB applications which blocks possible noSQL injection attacks. ## # This express middleware ensures that basic noSQL injection attacks are blocked when # request query parameters are used for MongoDB queries. # return (req, res, next…

My gaming and workstation build

After I decided against investing into a current high end gaming laptop I began to plan building my own small gaming and workstation. Here's what I ended up with so far: Components Case: SilverStone RAVEN RVZ01 mITX board: Asus Maximus VI Impact Processor: Intel Core i7-4770K Graphics card: MSI GeForce…

Shortening the tubes of a closed loop water cooler

Disclaimer: This should go without saying but.. If you do this to your closed circuit water cooler your warranty will most likely be void. There's no guarantee it will work. Water (even distilled) and electronics are no good friends, I am not responsible for any kind of electric shock sending…

Current high end gaming laptops

I recently thought about buying a new laptop, more specifically one that I can use as a workstation and for gaming. In the end I decided against buying one but it took me quite some time to create a list of current high end laptops that would be fitting the…

From heightmap to vertices, indices and normals

In this blog post I'll explain, or rather show you a solution for generating raw vertex, index and normal data from a given height map. While this has been written in JavaScript having WebGL in mind, it should be reusable for any other language, whether you use OpenGL or DirectX…

Turbulenz Engine: Reusable RenderTargets

I'm currently on a project where I need to do a lot of render-to-texture operations. Creating a new RenderTarget (more specifically WebGLRenderTarget) for each Texture to render to has a huge performance impact due to the usage of: Line 2046, graphicsdevice.ts: gl.checkFramebufferStatus(gl.FRAMEBUFFER); To make performance enhancements…