Categorías

Version Control

  • How to modify messages from unpushed commits

    Posted on:

    When working with version control tools like Git, it's not uncommon to make a typo or be unhappy with the message we've attached to a commit. Fortunately enough, there are two ways to modify the message of an unpushed commit in Git, depending on whether you want to change the message of the most recent commit or an older one.

Personal Projects

  • Audiotext reached 100 stars!

    Posted on:

    A few days ago, Audiotext reached the 100 stars milestone, which is my second project to achieve so, the first one being iOS Interview Questions. I realized that I hadn't written about Audiotext on this blog, so I thought it would be an appropriate moment to review the development of the project and how I plan to expand it.

Miscelanea

  • How to add the "Show project" button to a LinkedIn project

    Posted on:

    For some reason, LinkedIn has removed the "Project URL" field from the project form. As a result, there is currently no way to add it directly from the frontend. However, there is a workaround to add it with a `fetch` request, which I'll show you in this tutorial.

Back-end Development

  • How to use whenLoaded in Laravel API Resources

    Posted on:

    An Eloquent API resource in Laravel is a class that allows you to transform your Eloquent models and model collections into a JSON format suitable for API responses. It provides a convenient way to shape the output of your model data, making it easier to control what data is exposed and how it's structured in your API responses.

Front-end Development

  • Dynamic line clamp in React

    Posted on:

    Since there is currently no way to set the value of the -webkit-line-clamp attribute to auto, I've created a component to dynamically clamp the number of lines displayed for a given text depending on the height of its container.

Static Site Generators

  • How to add anchor links to headings in Astro

    Posted on:

    Anchor links are a useful feature for websites that focus mainly on text, such as a project documentation site or a blog. Like when I changed the code blocks style of my site, I went back to the Astro Docs repo to figure out how to add their anchor links to my site, so let me show you what I did to pull it off!

  • Astro Docs code blocks with Expressive Code

    Posted on:

    While researching how to add the View Transitions API with Astro, I thought about implementing the same code block style of their documentation because I find the default configuration of Shiki to lack some important features such as insertions. Also, the way the code blocks are presented in the Astro Docs is just beautiful.