I am slowly discovering the powerful Bash. Here’s something you’ll need eventually when working with Bash scripts and user input. How do you prompt the user to enter something in a Bash script? Of course you can print it later with: How do you set a default value? This syntax checks if name is empty. […]
Here’s how to order an array of objects by multiple property values. I want to order my friends: First the oldest. If they have the same age, first the tallest. We’ll use Array.prototype.sort() Result As you can see the friend 4 and 5, who have the same age have been sorted by tallest first.
This passed weekend I spent some time playing with Gatsby. Gatsby is a blazing fast modern site generator for React. Gatsby’s blog starter They provide a quick fool-proof way to bootstrap your blog with the gatsby-starter-blog repo. ⭐️ My TV Shows Review What was my plan? Use the provided repo to create the site to […]
gatsby-plugin-feed The plugin allows you to customize the fields, add new fields, etc. Great for adding, for instance, Podcast fields (Apple iTunes information). Check it out on Github. Add a new field On my Reviews site I initially wanted to add a new field. It is rather easy to add a new custom field, like […]
First of all, we need to travel back to 2019, when Google launched a new top-level domain. 👨🏻💻 .dev Before making it publicly available Google decided to have an auction period, in which people could bid on a name. Which makes perfect sense for brands. My idea was to get ricard.dev but was not willing […]
Bootstrap v4 does not come with a second level navigation out of the box. You can add it with just a few lines of CSS and JS. Here’s how to do add a second level menu navigation to Bootstrap 4. Actually with this you even to 3rd level menu navigation if you wish to. HTML […]
If you want to have a WordPress installation inside a sub-folder. Maybe you have a WordPress inside a WordPress, sounds more complicated that what it actually is. You might get an error when trying to publish a post or page: The response is not a valid JSON response. The scenario could be like this: Example.com […]
If you’re debugging a LocalStorage issue and want to use a call stack to know what or who is triggering a localstorage get or set you can define a proxy function. The following snippet will overwrite the window.localStorage It has the same functions but adds a console.log and debugger before them.