Posts with Tag: php

Gitlab + Multiple Slack Service Integrations

So we’ve got a Gitlab repo at work that we already have setup to publish merge requests and stuff to ...

Hackathons!

I’ve recently participated in a couple of hackathons to keep brushed up on my coding skills. In both ...

WordPress Tutorial: Recent Posts Block with Images

This post follows up on the last WordPress tutorial which shows how to start using featured images. ...

PHP Tutorial: Replace long link text

I created this function so that I could have a way of preventing very long non-breaking text links f ...

WordPress Tutorial: Featured Images

This is a quick tutorial on how to get out featured images, which I use extensively on this blog ([j ...

Most Recent Post

Multicast Ipv4 and Ipv6 in Java / Kotlin

I recently ran into a peculiarity of multicast in Java / Kotlin. I was using a MulticastSocket: [https://docs.oracle.com/javase/8/docs/api/java/net/MulticastSocket.html](https://docs.oracle.com/javase/8/docs/api/java/net/MulticastSocket.html) and trying to ensure that it winds up bound to either an Inet4Address or Inet6Address. It turns out that even if I did something like: ``` val multicastSocket = MulticastSocket(InetSocketAddress("0.0.0.0", MULTICAST_DEFAULT_PORT)) assert(multicastSocket.localAddress is Inet4Address) ``` The assertion could fail. Similarly if I did: ``` val multicastSock ...