Archive for the 'coding' Category


let’s do the timewaste again – or just another example on how some popular JavaScript libraries or frameworks freak me out

Let’s talk about code quality and about quality of documentation. One example. I’m using underscore. So there is ‘findWhere’ on collections. All you can get is “Just like where, but directly returns only the first model in the collection that matches the passed attributes.” Ok, fine, you might say, but what if it doesn’t find […]

Dockered tinyproxy for dev environment

The other day I was looking for a solution to replace my Charles based proxy setup for our legacy system’s dev environment. Mostly because a colleague doesn’t have a license and didn’t want to pay for it. And we’re only using it for a single use case. The functionality they call “Map Remote”. Basically it […]

Compile MongooseIM on OS X with openssl

Another tricky thing I always struggle with: Get MongooseIM compiled on OS X (since they removed openssl). So if you have openssl installed via homebrew just do diff –git a/apps/ejabberd/rebar.config b/apps/ejabberd/rebar.config index c693471..4e5ff1f 100644 — a/apps/ejabberd/rebar.config +++ b/apps/ejabberd/rebar.config @@ -8,8 +8,15 @@ {require_otp_vsn, “R?1[678]”}. {port_specs, – [{“.*”, “priv/lib/tls_drv.so”, [“c_src/tls_drv.c”], [{env, [{“LDFLAGS”, “$LDFLAGS -lssl”}]}]}, – {“.*”, […]

Erlang with openssl using kerl on recent OS X (El Capitan, Sierra) with homebrew

Since I struggle with this every time I have to setup a new machine, here’s the best solution IMHO: https://github.com/kerl/kerl/issues/103#issuecomment-176704372 In short $ cat ~/.kerlrc KERL_CONFIGURE_OPTIONS=”–with-ssl=/usr/local/opt/openssl” CFLAGS=”-DOPENSSL_NO_EC=1″ Since I struggle with this every time I have to setup a new machine, here’s the best solution IMHO: https://github.com/kerl/kerl/issues/103#issuecomment-176704372 In short $ cat ~/.kerlrc KERL_CONFIGURE_OPTIONS="–with-ssl=/usr/local/opt/openssl" CFLAGS="-DOPENSSL_NO_EC=1"

Otalk IM

A customer of mine asked for a WebRTC based, self hosted solution. So I started investigating and stumbled upon the great Otalk IM Client. Unfortunately it has not been maintained for a while. I decided to go with it nonetheless. I updated dependencies as required to make them work with latest stable NPM (3.x) and […]

CORS and basic authentication with cowboy and XmlHttpRequest

So this seems to be anything but straight forward so I document here for the sake of it. Note that you may not require an Authorization header for the preflight OPTIONS request, you may not set Access-Control-Allow-Origin to the wildcard in that case but to the originating domain specifically, of course Access-Control-Allow-Credentials must be set […]

Nagios Plugin to monitor BOSH services

Enjoy! #!/usr/bin/perl -w # # check_bosh plugin for nagios # # usage: # check_bosh -U url -H host # # Check if bosh service running at specified address # # initial version: 3 May 2000 by Truongchinh Nguyen and Karl DeBisschop # # current status: $Revision: 1196 $ # # Copyright Notice: GPL # $Id: […]

dojo vs. isArray

Some days ago a spent many hours to fix a somewhat broken toJson output from dojo. I’ve been copying around an array between different frames and ended up having an object instead of an array as it should be. Seems Ajaxian has a solution to this array bug now. So please dojo could you please […]

blog moved – wordpress downgrade considered harmful

Today I moved my blog away from IN-Berlin e.V. to my own server as I got frustrated by all those wordpress upgrades necessary lately. So maybe you might want to update your bookmarks. The new location is http://blog.jwchat.org. On my private server I’m hosting debian’s default wordpress package which should get security updates automatically, thus […]

jsjac++

Happy to announce a new version of JSJaC, the one and only lib for implementing jabber clients (if it’s about the web ;)). Most notably version 1.2.2 hopefully makes you happy with its new packer (borrowed from mootools) that shrinks down filesize from 71K to 44K. Other changes include bugfixes as well as some issues […]