Simulating network timeouts with toxiproxy

Goal: Simulate how a Node.js application reacts to timeouts. Solution: Use toxiproxy and its timeout “toxic” with the value of 0, i.e. the connection won’t close, and data will be delayed until the toxic is removed. The steps: 1. Start toxiproxy, exposing the port 6666 that we intend to use as localhost:6666: docker pull shopify/toxiproxy docker runContinue reading “Simulating network timeouts with toxiproxy”

Why do companies fail at adopting Functional Programming?

According to the NDC Oslo talk Lean and Functional Programming by Bryan Hunter, these are the reasons why companies fail to adopt FP: They say “our developers aren’t smart enough” (to use F#, Erlang) [they should invest in their education!] Culture of hiding problems => little incentive to adopt a paradigm that solves/prevents them if they’re invisibleContinue reading “Why do companies fail at adopting Functional Programming?”

Fix Shell Script Run via SSH Hanging (Jenkins)

There is an important difference between running a script manually (ssh machine; machine$ ./script.sh) and running it via ssh (ssh machine < script.sh): in the letter case the connection will not close when the script finishes but will stay open until stdout/stderr are closed or a timeout occurs. In Jenkins it will therefore seem as ifContinue reading “Fix Shell Script Run via SSH Hanging (Jenkins)”

Connect Tunnelblick to VPN automatically after wake up

Need: Make sure that VPN is always running except when at work. Partial solution: Make sure VPN is always running with “connect when computer starts” and using an AppleScript to connect after waking up from sleep. Disconnect manually when at work. Future: Check the current location (wifi name? IP?) and do not connect when atContinue reading “Connect Tunnelblick to VPN automatically after wake up”

Petitioning EU to act against Russian aggression in Ukraine

As a citizen of a country that has been invaded by Hilter in 1938 under the pretext of protecting local Germans and again invaded by Russia in 1968, I cannot watch another such invasion and annexation taking place in Europe while EU does little of any consequences. Please consider signing the petition to EU toContinue reading “Petitioning EU to act against Russian aggression in Ukraine”