Have you ever had to copy and paste duplicate content in a YAML file and wondered if it is possible to DRY that up? As it turns out, YAML allows you to repeat nodes via aliases.
YAML Aliases allow you to assign a name to a value or block of data and recall the assigned data by its name in the YAML file. Aliases should work for any file written in YAML.
hello: &hello 'hello'greeting:
hello: *hello #greeting.hello has the string value of 'hello'new_greeting:
hello: *hello #new_greeting.hello has the string value of 'hello'
As video conference calls are now part of my daily life, I decided to investigate how I can look better in front of my webcam. After some research, I bought an Elgato Key Light Air to help illuminate my face better.
So far, I’m delighted with the purchase. The key light has definitely improved how I look on video calls. But having to turn it on every time I have a video call and then turn it off when the call ends is a pain.
I considered leaving the light on throughout the work day, but the light can be…
Recently, I have had to implement a feature on a Ruby on Rails application where I had to ensure the user session was expired after a period of inactivity. The application was using the Devise gem as the solution for user authentication.
According to the Security Rails Application Ruby on Rails guide:
Sessions that never expire extend the time-frame for attacks such as cross-site request forgery (CSRF), session hijacking, and session fixation.
So even though long-lived sessions can improve user experience, it’s also a potential security vulnerability as it opens a user up to having his / her session physically…
I recently had to setup a new Windows PC, and I realised that the resources for setting up HQ local video playback were all over the place. I decided to consolidate those resources and write a guide.
I’m a software engineer who loves tech