Seb Jones

mail@sebj.co.uk

Blog

C Programming: Basic Performance Testing on Linux

Posted 02/11/2018

It can often be useful to use a high-resolution timer when programming, for example for performance testing or for real-time applications like video games. In this article we will be looking at how to do this on Linux with clock_gettime.

Read More

BASH Scripting: Minifying multiple JavaScript files into a single file

Posted 24/10/2018

Sass has the nice feature of taking a group of source files and putting them together as a single CSS file, with the advantage of reducing the number of HTTP connections the web browser has to open when loading your webpage, thus speeding it up. It also has the option to minify the code—taking out any characters that are purely cosmetic. In this article we will perform a similar task for JavaScript files, using BASH and a JavaScript minifier program.

Read More

BASH Scripting: Making a Simple 'Y/N' Prompt

Posted 19/10/2018

On Linux I often use the shutdown now command to shut down my computer, so I thought I would alias it to sdn. However, I was concerned that it might be too easy to accidentally type these three characters and end up losing unsaved work, so I decided to implement a prompt to confirm the shutdown. In this article we shall be looking at how I implemented this with a simple BASH script.

Read More

sitemap.xml