RSS

Golang Database Migration Tool

0 Comments | This entry was posted on Nov 01 2021

I have created a database migration tool based on the usage of PHP’s Yii2 framework migration tool. It’s a command line tool that will create and run migrations easily when running manually or automated.

Once setup, migrations can be created with ./main create new_user_table and then run with ./main up

More about the tool can be found on the Github page.

Backlight not working in Kubuntu 21.04

0 Comments | This entry was posted on Jun 02 2021

It seems that (at least for me) that a new install of Kubuntu (and probably Ubuntu) doesn’t recognise the backlight hardware or keypress on Lenovo X1 Carbon laptops (mine is gen 5).

Xev doesn’t recognise the keystrokes of either the brightness up XF86MonBrightnessUp, brightness down XF86MonBrightnessDown and an attempt to change manually with xbacklight -dec 10 returns an error No outputs have backlight property.

However just creating the following file with these contents resolved both issues:

/etc/X11/xorg.conf.d/20-intel.conf

Section "Device"
          Identifier  "card0"
          Driver      "intel"
          Option      "Backlight"  "intel_backlight"
          BusID       "PCI:0:2:0"
  EndSection

After that you’ll need to logout and back in to restart X. Hopefully this helps the next person.

AWS CloudFormation

0 Comments | This entry was posted on Apr 17 2019

As I’m building more complex applications to be hosted on AWS, it’s becoming tedious to manually configure the same thing over and over again. This is especially the case when a project requires multiple environments such as production, staging and development.

For this Amazon provide an automation tool named CloudFormation which scripts the architecture to make orchestration easier and less repetitive. The script almost anything that can be manually done through the web console, but commonly includes things such as:

  • EC2 image settings such as type, size and startup scripts
  • Load balancer configuration
  • Security groups
  • Databases (along with users and passwords)
  • S3 buckets

Like any infrastructure as code language or configuration management tool, CloudFormation scripts are great to ensure things are built exactly as intended without forgetting anything, but can also be reused for other projects.

The learning curve is a little slow but there are a lot of examples online to learn from and knowing how to build things using the console makes the transition to CloudFormation straight forward.

I think that if you’re building systems on AWS regularly, it’s worthwhile in getting your head around CloudFormation as it will streamline your work and ensure integrity in your systems.