1. Ruby Tricks 5 - Adding a Time Zone to a Date Time String

    Every now and then, we get data that has a date time string in the local time zone but with no time zone specified. This short note is on how to attach the correct time zone to the data so that it can be used in systems that rely on the time zone.…


  2. TE@Onghu - T-Engine, T-Kernel, uT-Kernel and TRON Information

    Way back in time from 2004 – 2010, I spent a lot of time working in embedded real-time operating systems, mainly focusing on the use of µC/OS-II and the Japanese T-Kernel which evolved up from the TRON real-time kernel that was in wide use in embedded systems in Japan. At that time, I was the first person outside Japan to port the T-Kernel to a different CPU – I had ported the kernel in 2004 to the TriCore (a CPU with RISC, microcontroller and DSP instructions in the same CPU core instruction set) from Infineon Technologies.…


  3. Using Bundler Package to Distribute Gems and Ruby Applications together

    There are a few ways to ensure that your Ruby application/ script has all its dependencies available when you set it up or deploy. The most common way is to use Bundler so that you can specify your Gemfile and Bundler can help set up the gems on a remote server when you deploy. Rails lets you “freeze” your gems to the vendor directory which is convenient so that you can package everything together and distribute it. I wanted to do the same for a non-Rails Ruby application but finding material on this is quite difficult since everything leads back to Rails and finding recent material is quite difficult.…


  4. Ruby Tricks 4 - Using a Ruby Gem from a Private BitBucket Repository

    All Ruby and Rails developers need to use Ruby gems for common work. It’s also a great practice for you to create your own Gems to separate functionality that you can reuse across your projects. You can publish your gems to the world using the RubyGems site which is the starting point for almost all gems!…


  5. Ruby Tricks 3 - Finding all Dependencies of a Ruby Gem

    Recently, for some work, I had a question about all the dependencies that a gem had. I went to the gem specification file and took a look – that obviously had a list of gems which had their own dependencies. I wanted to have a way to get all the dependencies so that I would know what I was dragging in by using a seemingly simple gem [like many people, I was wondering if using a Rails module by itself would drag too many things in].…


  6. Journey to Jekyll: Part 6 - SSL with ZeroSSL on IBM Cloud/ Bluemix

    This site is set up on IBM Cloud and built using Jekyll. When I took a casual look at securing this blog site with HTTPS, it looked like using ZeroSSL (as a free SSL certificate provider) should have been quite easy.…


  7. Journey to Jekyll: Part 5 - Showing .directories with Staticfile Buildpack

    If you’re using IBM Cloud and Staticfile Buildpack for Jekyll and want to show the contents of directories that start with a “.” on your statically generated site, you need to do a couple of things.…


  8. Journey to Jekyll: Part 4 - Adding .directories to your site

    We have looked at how to get your Jekyll site up and running. In some cases, you need to have a directory on your site that starts with a “.” – usually, some system item requires it. By default, when Jekyll is building your site, it will ignore directories in the root of your Jekyll project that start with a “.” and uses directories that start with an “_” as inputs for building the site.…


  9. Power BI - Create new table by expanding columns

    I use Power BI to visualise the team I work with and to see where we have been spending our time. Recently, I was trying to see if I could visualise what people would be busy with over the next few months and found it a bit challenging since the source data becomes multi-dimensional. I used a small Ruby script to bail me out of the immediate need that I had but I wanted to look for a method that worked within Power BI itself (using PowerQuery and/ or DAX) so that the solution was self-contained.…


  10. My Hardware Setup at Home

    With the recent discussions around working from home and home-based learning due to COVID-19, someone asked me what equipment I use at home, and I wrote up something to make a list of what serves me well. It’s equipment that I have collected over the better part of 10 years buying some things new and some things used to end up with a setup that works well for me. For most part, I have the same setup in the office which makes muscle memory work more effectively.…


  11. Launching a Windows 10 App from the Command Line

    I’m trying to note down things that have helped me while using Windows – to the point that I feel that my setup is geared towards me, and it sometimes, becomes a challenge when using someone else’s computer temporarily. The post is for me to remember how I did something but if it helps someone, that’s a plus!…


  12. Ruby Tricks 2 - Net::HTTP and HTTPS/ SSL

    I have been using RSpec to test an API and calling web services is a natural part of the work – so, I find myself going back to the Net::HTTP documentation from time to time. Most of the items are quite standard and the very well-written page (almost a cheatsheet) is at: https://docs.ruby-lang.org/en/2.7.0/Net/HTTP.html


  13. Ruby Tricks 1 - Environment Variables in Config Files

    In a recent conversation, we were discussing the practice that we should not store values such as API Keys in the configuration file, but instead load them from an environment variable. The reference was to how the database.yml in Rails allows us to provide the details as environment variables in production. I needed to store some such values for some API tests that I was building using RSpec, and decided to find out how Rails does it – and realised that it’s blindingly obvious.…


  14. JRuby on Windows: Day 1 - Running Scripts

    JRuby is a Java implementation of Ruby that runs atop the Java Virtual Machine. In a previous post, we covered how to install JRuby on Windows. We also saw the commands for running and installing gems, bundler, irb and so on. Take a look at it again for the basics, if you need a refresher.…


  15. Jekyll on Ruby 2.7 on Windows: Installation

    This started due to something on Twitter where someone questioned if Ruby + Windows + Jekyll was still viable in 2020. Since I had just set up Ruby 2.7, I decided to give it a spin after suggesting that I didn’t think that there will be a problem!…


  16. JRuby on Windows: Day 0 - install and Hello World

    JRuby is a Java implementation of Ruby that runs atop the Java Virtual Machine. The JRuby wiki has this to say:…


  17. Deleaker - finding leaks in C++ Builder and Delphi projects

    Deleaker is an extension that can help C++ Builder and Delphi users to find leaks in their applications. This post provides a very brief introduction to it.…


  18. Using RadiantCMS in 2020

    After a very long time and being recently frustrated by using Wordpress for one of our sites, I was keen to go back and check how things were with RadiantCMS which had long been my go-to CMS for my work. I really liked how it worked. However, the rapid jumps in Rails versions at one time meant that Radiant found itself a bit left in the cold, and lost favour.…


  19. Use Command Files to Switch Directories Easier on Windows

    We all have our own preference of which operating system works best for us, and helps us enhance our productivity. Over time, we also devise our own ways to make the operating system work better for us, and to train ourselves to work better on our computers.…


  20. Journey to Bluemix: Part 4 - Updating the Buildpack

    In a previous post, we covered how to get your Jekyll blog working with Bluemix – that post was written in 2017 and if you followed the instructions now, you would find that you are unable to deploy your site since it fails. You will see an error as below on your command line.…