Archive for the 'erlang' Category


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"

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 […]

Migrate ejabberd DB schema (mysql) from 2.1.x

Hiya! Long time no see. So I was upgrading my beloved ejabberd a while back and when I looked closer I found that most of the new functionality just wouldn’t work. Mostly because my ejabberd’s DB schema dating back to some 2.1.x install didn’t fit anymore. So but how to upgrade? After playing weird ideas […]

Cookie monster’s eating all of my Websockets

Lately I came across to playing around with XMPP Over Websockets. The objective was to get something like page transitions working for Websockets as well as they do with BOSH. With page transitions I mean being able to integrate some XMPP client into a web site that still has the old habit of loading new […]

ejabberd memory leak

If your ejabberd seems to leak memory it might result out of this bug in erlang’s mnesia database. You can easily find out by starting a remote shell to your running ejabberd and whatch results for the following command: lists:foldl(fun(Tab, Acc) -> ets:info(Tab, memory) * 8 + Acc end, 0, ets:all()). The bug is fixed […]

ejabberd mysql drivers for debian and ubuntu

Debian (and ubuntu) packages for ejabberd don’t contain drivers for mysql. If you want to connect your ejabberd to mysql you need to get those drivers separately from the external ejabberd modules repository and compile them on your own. For convenience I’ve built a debian package containing the precompiled modules: ejabberd-mysql-20090114_1-2_all.deb Note: this package is […]

obfuscated erlang

Want to have fun playing with erlang? Then join the Obfuscated Erlang Competition! Want to have fun playing with erlang? Then join the Obfuscated Erlang Competition!