ROllerozxa

Blog posts (page 4)

The SDL logo with crudely drawn limbs and a face on it. It has angry eyebrows and it is running fast, as noted by the speed lines

SDL_LEAN_AND_MEAN

1040 words

As storage space becomes larger and larger even on the most modest of phones and bandwidth is becoming evermore plentiful, software tends to become larger in size over time as the necessity to optimise filesizes decreases. But there are also people who wish to reverse the trend by trying to conserve the amount of space their resulting program becomes through going closer to the metal or finding clever ways to cut down the size of their dependencies.

SDL is a library that aims to provide cross-platform low level access to input, audio, graphics and more that will just work across all supported platforms, for games and other multimedia programs. While the library originally had humble beginnings it has since grown with size as new features that while may be useful to some, are not something everyone would utilise when using SDL. Thankfully there are countless build options you can use to control what gets built with SDL but there is also the rather funnily named and undocumented define, by the name of SDL_LEAN_AND_MEAN.

Collage of logos for ccTLDs, from left to right: .cc, .ar, .me, .ml, .io, .tv, .gl, .co, .nu, .tk and .ai

Country Code TLDs and their unintended use cases

1795 words

Country Code TLDs (ccTLDs) are top level domains that are assigned to countries with names based on their ISO 3166 2-character country code. Their intended usecase are for regional, local sites or otherwise is tied to a country. But due to two-letter TLDs being reserved to ccTLDs, and there being fewer gTLDs in the past than there were now, a lot of effort has been put into repurposing ccTLDs, as well as creating clever domain hacks and short domains out of obscure but convenient country codes.

Many small countries have either struck digital gold with their country code, or been robbed of their space on the internet by opportunistic entrepreneurs who realised their worth far earlier than they did. This blog post goes over a list of the unintended use cases of ccTLDs, from specific domain hacks to full registry takeovers, but is by no means exhaustive.

Screenshot of terminal output from configuring SDL for crosscompiling using llvm-mingw. The LLVM logo and the MinGW-w64 logo is shown to the right.

Cross-compiling for Windows using llvm-mingw

1096 words

llvm-mingw is an LLVM-based MinGW-w64 toolchain distribution for compiling C/C++ programs for Windows. Prebuilt toolchains are provided as plain archives both for compiling natively on Windows, or for cross-compiling from Linux and macOS.

Compared to traditional MinGW-w64 based toolchains, it uses the Clang compiler as well as libc++, LLD and other LLVM projects in place of their GNU counterparts. With this it has support for compiling for Windows ARM targets and can target all four modern Windows architectures with one set of toolchain binaries.

Screenshots of the Google Webfonts helper, RealFaviconGenerator and Pictogrammers websites stacked on top of eachother.

Small useful tools for web development

776 words

This blog post goes over some small tools and utilities I have come across and that I find useful for web development. They’re not things like code editors, the developer tools in your web browser or documentation resources, but small tools that help you with one specific thing that you’re bound to run into when making any website.

Screenshot of the treemap of QDirStat showing a lot of coloured blocks representing differently sized files.

Visualising disk usage on a headless server with QDirStat

880 words

If you’ve ever got a long running headless server that gets some amount of use, it will eventually accumulate files and data on the disk until the point where the allocated disk space for the server runs out and you will need to clean some things out. Running df -h tells you it is completely full, but how will you be able to see what is taking up the space?

There exists all sorts of graphical programs to visualise disk usage for various operating systems, but when you’ve got a server that you maybe only have headless SSH access to, your options become quite limited. Fortunately the program QDirStat has a feature that allows you to scan a filesystem into a cache that can be opened and inspected on another system.

'TOTP - Time-based one time password'. The Google Authenticator logo is used as an asterisk above TOTP, in the background are screenshots of 2FA instructions for various services.

TOTP - The most misunderstood 2FA method

1480 words

Time-based one-time password (TOTP), RFC 6238, is an authentication method commonly provided as a means of 2FA for many services. It is a great alternative to other 2FA methods such as SMS.

It is unfortunately also very misunderstood due to the common misconception that it requires a phone or a proprietary app, but the algorithm is fully open and the process to generate a code does not depend on any external sources other than the fabric of time itself.