Proxy Authentication with Selenium

I’ve been working a lot with selenium for C# lately and one of my company’s projects required me to use proxies for certain automated tasks.

For basic proxies, selenium nicely uses the inbuilt functions that firefox offers in order to set up proxies, it’s really quite simple:

 var Proxy = new Proxy();          //Create proxy object
Proxy.Kind = ProxyKind.Manual;     //set to manual mode
Proxy.HttpProxy = ip + ":" + port; //add ip and port to proxy protocol

However, Firefox really doesn’t offer the best proxy configuration options, and I really needed to use a proxy with username:password authentication, which just does not work with selenium.

Continue reading “Proxy Authentication with Selenium”

Building a Word-Clock (QLOCKTWO Clone)

(Attention: The code shown below might be wrong, because my Code-Plugin for WordPress often messes up the code I paste here. I uploaded the entire project to GitHub, so you can just download it from there:
The LED-Clock code is then located in
piLedClock/rpi_ws281x/python/ and can be started from there. )

After recently remodeling my apartment and with some time off over the Christmas holidays I felt like I should add something special to my living space. During this time I saw a post on Reddit of someone who had built a clone of the famous QLOCKTWO LED-clock, which inspired me to follow suit.

Since I had stopped playing around with electronics a long time ago and wasn’t in the mood to go all out and build an LED-matrix myself, I decided to do things differently and use individually addressable RGB-LED-strips. This way I avoided having to either order custom PCBs or having to build the circuits on breadboards since all that was needed on the electronics-side were a raspberry pi, the strips, a power supply and an appropriate connector as well as some wires.

If you want to build a similar clock, you’ll mainly need these parts (plus some tools like a soldering iron, wire strippers, solder, wires, and basic electronics stuff):

Continue reading “Building a Word-Clock (QLOCKTWO Clone)”

Avoiding Ugly Camera Clipping In Unity3D

In 3d games, a lot of attention by developers is focused on elements of the engine that might hinder the players’ immersion in the game. These can be big projects, like defeating the uncanny valley (see my last post on realistic characters), or little eye-catching bugs or features of a game that drastically differ from how a user expects things to look.

The ugly reality of near clipping

In the world of 3d games, we rarely deal with volumetric objects (objects that have an ‘inside’), but rather most of our assets are hollow on the inside. This saves a lot of performance and usually doesn’t matter for the player unless the game needs it (for example a game where you need to dig into the ground, or a flight simulator with volumetric clouds).
A game’s camera usually has a specific area in which it will render these objects, consisting of a near plane and a far plane. If an object is too close or too far, it simply won’t be rendered by the camera. However, if an object just barely intersects with the near plane, the ugly reality of hollow objects shows itself to the user: 3d models are not only hollow, but you can see through them when the camera clips part of the object!

Continue reading “Avoiding Ugly Camera Clipping In Unity3D”