Posts

The New Imgflip AI Meme Generator Is Fun (and dark)

I love a good meme and when I encountered Imgflip’s AI meme generator recently, even more so. As I cycled through the generator I noticed that it started producing some interesting memes. The site describes the process for obtaining data to produce some of the AI memes: The network was trained using public images generated by users of the Imgflip Meme Generator for the top 48 most popular Meme Templates. Beware, no profanity filtering was done on the training data so you may encounter vulgarity.

How To Centre Columns In Bootstrap 4

It’s 2020 and while there are many things I do know, there are still some trivial silly things I do not or always forget. Case in point being, how to centre columns in a Bootstrap 4 layout. Unlike Bootstrap 3, Bootstrap 4 uses Flexbox and therefore, you have more options for centring your layouts. One such method is the justify-content-center class defined on the row which will align the columns center. Finally, you use the text-center class to middle align the content of the column.

Level Up Your Aurelia Applications With Router Layouts

When it comes to building applications, inevitably you will encounter situations where the base markup of your page is different than other parts of your site. The base structure of your front-facing pages like the homepage might be different from your administration panel or user dashboard, which might look similar but work very much differently. Surprisingly, I don’t see a lot of developers who work with Aurelia opting to use them. I think Router Layouts are a forgotten feature to some, requiring a little upfront work which can net you a long-term negation of pain when trying to make your markup work.

I Used To Hate Using Reduce In Javascript, And Now I Can't Stop

I used to be vehemently against using `reduce` in Javascript. It wasn’t because I thought there was a better way, I actually think the functional programming purists and their aggressive approach to advocacy are what really turned me off. That and those who advocate for using it over a basic for loop as well. Now, there are instances where I truly believe that filter, map and reduce should not be used. If you’re just wanting to quickly iterate over a collection of values, in many instances. a for..loop will beat all of those aforementioned methods in performance every single time. And if you’re dealing with large collections of items, you will notice.

I downloaded the Australian government's CovidSafe Tracking App (so you don't have too if you don't wanna)

The controversial Australian government contact tracing application based on the Singapore version has finally been released for Australians. Understandably, a lot of people are concerned about their privacy and whether or not the government messed this up. I had a spare phone lying around, so I installed the application for the lols. I decided to see if I could find anything nefarious with the app or if it drains my battery like Singaporeans reported their app did.

How To Mock uuid In Jest

When it comes to mocking dependencies in Jest, it couldn’t be easier. You can create an actual mock module that gets loaded in place of the dependency in your app or you can do it manually by mocking the implementation or module. import { SomeClass } from './some-file'; // Mock the uuid module and v4 method jest.mock('uuid', () => ({ v4: () => 'hjhj87878' })); describe('Test Case', () => { let sut; beforeEach(() => { sut = new SomeClass(); }); test('My Test', () => { expect(sut.returnUuid()).toReturn('hjhj87878'); }); }); For reference, our SomeClass implementation looks like this:

Dinnerly Australia — COVID-19 Review

As I explained in my HelloFresh review here, we have been trying out at home meal kits because of the shortages of basics in the grocery stores here in Australia such as; mince, flour, eggs and so on. After trying HelloFresh, we decided to try out Dinnerly which markets itself as, “Australia’s most affordable home dinner kit” it’s actually owned by Marley Spoon, just a cheaper version for those who cannot afford Marley Spoon which is one of the more expensive options.

How To Develop A Seedable Dice Roll/Number Guess In JavaScript

Recently whilst working on some blockchain specific code, I needed to write a random number generator to simulate generating a range of numbers, except it needed to be predictable. The same input values produce the same output when provided. In my case, I used values from immutable blockchain data such as the blockchain number, reference block number and transaction ID. I then allow the user to provide a client seed and generate a unique server seed on each roll as well.

COVID-19 Remote Is Not Working Real Remote Work

Globally, many of us are all in the same unfortunate and unprecedented situation because of the Novel Coronavirus COVID-19. I am fortunate to both work in an industry where I still have a job and for a company mostly unaffected by COVID-19. Sadly, for many, this is not the case as people find themselves out of work through no fault of their own. For others, they find themselves working remotely; for many, it’s their first time.

HelloFresh Australia — COVID-19 Review

This COVID-19/Novel Coronavirus has really changed the world and how we live. Even the basic things we take for granted like being able to go to the shop and buy meat, bread, rice and toilet paper have become difficult tasks. We have a family of four. Two adults and two children, my son is four years old and my daughter is fourteen months old. Out of frustration of not being able to find basics in the stores like; flour, eggs, rice and mince, we decided to explore home meal kits.