Page 1 of 2

A simple setup for a Build and Deploy system using GitHub Actions Dec 12 2020

I’ve been using GitHub Actions on a few projects now, and I find them like the future of what bash scripting was back in the day. I feel I can do pretty much everything in a quick and concise way. In this post, I’ll show you the setup I use for a simple Build and Deploy GitHub Action.

This post is not an in-depth view on GitHub Actions, but let’s review some basic concepts, so we know what we are talking about.

Read More...

Set up a macOS Parallels Virtual Machine for security research Nov 16 2020

macOS comes with a good set of predefined security features designed to keep us safe, e.g. System Integrity Protection. These security features are great for everyday use, but they get in the way when we are trying to analyse what processes are doing, for example, attaching to a process using lldb. In this post, I’ll show you how to set up a Virtual Machine (VM) using Parallels Desktop and Disable SIP so you can use the VM as your research lab.

Read More...

Adding dark mode to a UIKit App Nov 4 2020

First, remember create a new branch for the changes, we can do that using Xcode or the git(1) command-line tool.

The basic support

iOS 13 introduced semantic colours, so UIKit already comes with support for automatic colour selection depending on the UserInterfaceStyle. So the simplest setup is to change our UIColor to semantic colours. For example:

Read More...

Generate table of contents with anchors for markdown file - Vim plugin Jul 20 2020

Vim is my preferred text editor, and I do most of my writing on markdown. If you haven’t used markdown, I encourage you to try it out. Markdown is a simple markup language that is in common use on the internet for static site generators. The syntax is easy to remember; that is probably why I prefer it. One useful improvement to our markdown files is the addition of a tabel of contents. Having a table of contents on my documents is handy, but more than just having the table of content being able to navigate to the sections is even better. In this short article, I’ll show you how I accomplish this by using my modified version of the vim-markdown-toc plugin.

Read More...

Running a web server on FreeBSD inside a jail Jun 27 2020

Creating a jailed web server is a fun exercise to learn how about jails. If you are reading this post, you are probably already convinced of the benefits of running your services inside jails. A jailed service provides additional security by restricting the jailed environment to access only to its perceived root directory. We can run many services in the same host, and we could isolate them to their own jailed environment. Another useful trait of jails is dependency segregation. We can run different jails that depend on different versions of the same libraries or programs, without causing problems between them. Each jail will have its own userland. In this post, we are going to explore how to run a service inside a jail. We are going to use Nginx as an example, but you can take what you learned in the post and apply it to your specific case.

Read More...

WWDC20 Interesting videos list Jun 26 2020

Here is the list of the videos I’m looking forward for the 2020 WWDC. I might add notes/comments later when I have seen them all.

Swift and Objective-C


Notes on FreeBSD UFS partition schema Jun 1 2020

Sometimes deciding on a partition schema could be a confusing, here are my notes on partitioning a GPT disk. I hope you find them useful.

I will advice creating a virtual machine using FreeBSD and take it for a spin. It would be nice if we had lots of physical devices we could work with to gain more experience, but a virtual machine will do.

Before we begin, make sure you have a copy of FreeBSD. You can download it from here. My architecture is amd64 so that’s what I’ll use.

Read More...

Using the script command to record a terminal session May 25 2020

When working on the command-line, I sometimes would like to record what I was doing to extract the exact message a script returned without having to rerun all the commands. Similarly, when I’m trying to report an error to a coworker and want to show precisely what I did. All of this can be achieved by using script(1). The script command allows us to record the terminal session, including output and input to a file for later analysis. It is handy, so in this note, I’ll show you how I usually use it.

Read More...

Migrating an old JavaScript codebase to modern JavaScript May 18 2020

We get excited about starting a new project. It allows us to use new technologies, and we don’t have to worry about being compatible with any old code. In reality, most of the work we do is maintenance. And I do believe, that working with legacy code requires more skills and creativity than starting a new project from scratch with zero limitations.

Whatever the case might be, refactoring JavaScript code to modern JavaScript is challenging. In this post, we are going to visit many aspects of the process of bringing our old JavaScript code to modern JavaScript.

Read More...

Compiling a custom FreeBSD kernel for Parallels VirtualMachine May 13 2020

I use Parallels on macOS to spin virtual machines for learning purposes. Lately, I’ve been interested in FreeBSD, so I wanted to create a slimmed-down version of the FreeBSD Kernel for my VM. And that is the topic of this post, how to create a custom FreeBSD Kernel for a Parallels virtual machine. It is not limited to Parallels tho. You can easily use the content of this note to build any custom Kernel.

Read More...