logo

Blog.

new articles.

How to remove the trailing slash of a URL on a Hugo static website running on Netlify

/ Static Site Generators

I recently migrated www.oprea.rocks from Gatsby.js to Hugo. My biggest complaint was not being able to remove the trailing slash on all pages. Assuming your website is on Netlify, here are the steps to remove trailing slashes on your Hugo website/blog. Enable asset optimization on Netlify You can hand-pick your settings but for this purpose I left them all on — especially the “Pretty URLs” setting. That turns the HTML files generated by Hugo into nicely formatted URLs, but without that ugly, trailing slash. Read more

Fixing Golang GIN-debug WARNING Headers were already written.

/ Software Development / Golang

If you’re just getting your hands dirty with Golang, and specifically with Gin, which is a web development framework, you might come across this specific warning: [GIN-debug] [WARNING] Headers were already written. Wanted to override status code 400 with 200 Most likely, you’re trying to use BindJSON on a property that does not exist. Here’s an example. I’m building an analytics solution for weremote.eu and for its pageview counter, I wanted to also be able to pass in extra props besides the usual props such an event would carry. Read more

Handling errors is an essential skill

/ Coding Stories / Opinion

I’ve met tons of developers who would not do error handling because of fear of it being too much. Here’s a short list of reasons: We’re going to write too much boilerplate because the properties are too deeply nested. The code will look ugly. Why write a ton of if statements? The server always returns that response, why bother? Why validate this input — it’s declared as type="number" in the DOM so it only takes numbers. Read more

A Markdown Story

/ Productivity / Opinion

It’s 2014 All my colleagues are writing their Bachelor’s Degree paper in LaTeX1. Or MSWord… 🤮 I’m doing it in Markdown, mostly because LaTeX looks too verbose for me. And I’m not that smart anyway. I was never the brightest bulb in the chandelier, to begin with. So, back to LaTeX: too verbose, too many keywords. Looks like the type of thing highly skilled academics use to flex their look-at-how-many-format-specifiers-I-can-pull-from-memory muscles. Read more

How I learned to talk about WeRemote.eu during Y Combinator Startup School sessions

/ Entrepreneurship

I signed up to Y Combinator Startup School with WeRemote. I’m putting in weekly status reports, watch some of the lectures, and I only missed a single session so far. During each session I have to talk about the platform and describe it. __It’s like an investor pitch. __ What’s funny is that neither myself, nor a many of the founders I talk to manage to keep the presentation short and concise. Read more

🚨 Proper conduct when shopping for web design or development services

/ Business advice / Opinion

🛑 Stop asking for a price You are not buying potatoes at the farmers market! Think about it as if you were buying a pair of custom designer shoes. You may ask, and get a starting price, but that’s it. The rest depends on the model, materials required, adjustments made to the shoes to fit you, the deadline, as well as the number of orders the designer already has & can take. Read more

Custom-coding a landing page in 45 minutes

/ Development / JavaScript / Marketing

Getting feedback from your target audience early on in product development is pure gold! This helps you make reusable components that allow you to iterate, build and test out new ideas a lot faster. This is what I did with weremote.ro and all that feedback and community involvement helped me create a non-intrusive UI/UX that I can reuse on weremote.eu, which is coming soon. It’s what enabled me to create the landing page for weremote. Read more

How to fix GitHub Actions error docker build requires exactly 1 argument.

/ Software Development / Coding Stories

I’ve been working on migrating my the remote jobs platform I built in the past months from weremote.ro to weremote.eu. The platform’s backend is a GraphQL API built over Express.js which runs inside a Docker container. I was initially building the image myself, whenever I pushed some changes worth deploying to production, but I very quickly switched to GitHub Actions once I learned about this feature. With this migration to . Read more

On sophists and sophisms

/ Journal

“I have never let my schooling interfere with my education.” — (attributed to) Mark Twain I’ve met people, both online and IRL, who believe that if they’re schooled they must also be educated. People who believe that the educational funnel they went through must have made them better than the rest. Although the last statement might be true, in some regards, they tend to extend its meaning to being better than others with a number of years of practical experience equivalent to their years of study. Read more

What's your financial freedom goal?

/ Journal

I’ve been thinking about an answer to this question since I started migrating everything from www.weremote.ro to www.weremote.eu. I thought long and hard about an answer, since all the effort I’m putting into this remote jobs platform is personal, self-funded and self-everything-else. I finally found it, today: I want to reach the level of financial freedom that would allow me to use my phone without a protective case. Now I’m going to pass it on to you: Read more

Copyright (c) 2021 Adrian Oprea. All rights reserved.