Skip to main content

Dev Diary

BlogAboutContact
  • Get a list of all shell built-ins

    05 July, 2023
    Time to read: 1 mins
    bash

    Get information about all the shell built-in commands with the help built-in command.

  • Inspect text that contains control characters in bash

    05 July, 2023
    Time to read: 2 mins
    bashunicode

    Inspect text that contains control characters with the xxd command. xxd can also be useful when you want to see the bytes of UTF-8 (Unicode) encoded files.

  • Join the lines of two files based on a common column

    04 July, 2023
    Time to read: 3 mins
    bashSQL

    See how to join the lines of two files in bash, based on a common column with the join command. You'll also see how to perform SQL-like joins on files.

  • Get specific rows from a file

    29 June, 2023
    Time to read: 2 mins
    bash

    User awk's NR built-in variable to print only specific rows from a file.

  • Split the even and the odd lines of one column into two separate columns

    27 June, 2023
    Time to read: 3 mins
    bash

    See how the paste command works by splitting the even and the odd lines of one column into two separate columns

  • Get specific columns from multiple files and paste (combine) them into a new file

    25 June, 2023
    Time to read: 1 mins
    bash

    Use the cut or awk commands to extract specific columns from files and create a new file that has all the previous columns with the paste command.

  • Web scraping in the console

    02 November, 2020
    Time to read: 6 mins
    javascriptCSS

    A collection of code snippets you can paste in the browser’s console to get useful data back.

  • System fonts

    24 October, 2020
    Time to read: 7 mins
    typographyCSS

    Learn how to use system fonts effectively. You will also find an interactive table with system fonts, font stack suggestions by classification, and some type specimens for comparisons.

  • React’s useState hook details

    02 August, 2020
    Time to read: 3 mins
    react

    Learn the difference between lazy initialization and passing a value as the initial state, the functional and the regular form of setState, and more.

  • What’s the difference between using a ref and a variable to keep track of a value in React?

    10 June, 2020
    Time to read: 1 mins
    react

    Learn what’s the difference between using a ref (for example, with the useRef hook) and regular variables (outside of a functional component) to keep track of a changing value.

  • Creating font subsets

    06 May, 2020
    Time to read: 15 mins
    typographyunicodeperformance

    Improve the typography and the performance of your site by creating custom font subsets.

  • Reforma typeface notes

    20 March, 2020
    Time to read: 2 mins
    typography

    My notes for the Reforma typeface designed by Alejandro Lo Celso.

  • Using the contenteditable attribute

    17 March, 2020
    Time to read: 3 mins
    HTMLreact

    Create a <textarea> that resizes while the user types with the contenteditable attribute.

  • Add inline style elements in Gatsby

    15 March, 2020
    Time to read: 1 mins
    typographyperformancegatsby

    See how to add inline style elements to a specific page in your Gatsby app with react-helmet.

  • Work Sans typeface notes

    12 March, 2020
    Time to read: 1 mins
    typography

    My notes for the Work Sans typeface. Work Sans is designed by Wei Huang and is published under the SIL Open Font License.

  • Source Sans Pro typeface notes

    11 March, 2020
    Time to read: 2 mins
    typography

    My notes for the Source Sans Pro typeface. Source Sans was designed by Paul D. Hunt and is licensed under the SIL Open Font License.

  • Performance notes

    14 November, 2019
    Time to read: 13 mins
    performance

    An overview of standard and custom performance metrics, and how you can track them with code or by using the Chrome DevTools.

  • Debugging notes

    13 November, 2019
    Time to read: 2 mins
    testing

    Tips and tricks you can use to debug JavaScript applications.

  • Useful Lodash utilities

    13 October, 2019
    Time to read: 8 mins
    lodashjavascript

    You can find here a collection of the most useful lodash utilities, with simple explanations, examples on how to use them, and more.

  • JavaScript string methods

    08 October, 2019
    Time to read: 1 mins
    javascript

    See the most useful JavaScript string methods, what they do, and examples on how to use them. All that, in the least possible space.

  • Yargs examples

    01 October, 2019
    Time to read: 4 mins
    node

    Learn how to use Yargs to parse CLI arguments and create help menus with some practical examples. You can also find explanations for common CLI terms.

  • Curl examples

    26 September, 2019
    Time to read: 2 mins
    curl

    Explore the basic curl options for the HTTP protocol with some practical examples.

  • Array prototype methods

    15 September, 2019
    Time to read: 2 mins
    javascript

    See the most useful JavaScript array methods, what they do, and examples on how to use them. All that, in the least possible space.

  • Notes from YDKJS - this & Object Prototypes

    11 September, 2019
    Time to read: 9 mins
    javascript

    Some notes I wrote while reading this & Object Prototypes from the book series You Don’t Know JS Yet.

  • Tail calls, tail-recursive functions, and tail call optimization

    06 September, 2019
    Time to read: 3 mins
    javascript

    Find out what is a tail call, a tail-recursive function, and how the compiler can optimize them.

  • Async/await resources

    01 September, 2019
    Time to read: 2 mins
    javascript

    Some useful resources if you want to learn to use async/await.

  • Promise resources

    31 August, 2019
    Time to read: 3 mins
    javascript

    Some useful resources if you want to learn how to use and write promises in JavaScript.

  • Event loop resources

    30 August, 2019
    Time to read: 3 mins
    javascript

    Some useful resources if you want to learn about the event loop.

  • Learn to write async code in JavaScript

    30 August, 2019
    Time to read: 1 mins
    javascript

    Some useful resources if you want to write async code in JavaScript.

  • Puppeteer examples

    26 August, 2019
    Time to read: 2 mins
    puppeteernode

    Learn how to accomplish common tasks with Puppeteer through some practical examples.

  • Page transitions in Gatsby

    25 August, 2019
    Time to read: 2 mins
    gatsby

    You can find here some experiments I made with complex page transitions in Gatsby.

  • GraphQL queries inside MDX files

    22 August, 2019
    Time to read: 1 mins
    gatsby

    See what options you have when you want to query data with GraphQL inside your MDX files.

  • wrapRootElement vs wrapPageElement

    21 August, 2019
    Time to read: 1 mins
    gatsby

    We see the differences between two browser APIs in Gatsby: the wrapRootElement and the wrapPageElement.

  • Create a pre-commit hook

    20 August, 2019
    Time to read: 2 mins
    huskylint-staged

    Create a pre-commit hook with husky and lint-staged, and preserve the quality of your code

  • Unit testing with react-scripts

    19 August, 2019
    Time to read: 1 mins
    testingjavascript

    Write unit tests with react-scripts to quickly test some code if you don’t want to set up a build process just for testing.

  • Useful VS Code shortcuts

    18 August, 2019
    Time to read: 7 mins
    VS Code

    You can find here some practical VS Code shortcuts I use all the time that will help you improve your productivity.

  • Fix oversized icons from react-fontawesome

    17 August, 2019
    Time to read: 1 mins
    react

    If your react-fontawesome icons appear oversized when you first load the page in an SSR build, then this fix is for you.

  • A hacky way to display audio translations from Google Translate

    15 August, 2019
    Time to read: 1 mins
    HTML

    See how to display a short audio translation of a word or phrase from Google Translate in HTML.

  • Preserve new lines and spacing in CSS

    14 August, 2019
    Time to read: 1 mins
    CSS

    See how you can preserve the new lines and spacing of text in HTML by using the white-space CSS property.

  • How to break up long links with CSS

    14 August, 2019
    Time to read: 1 mins
    CSS

    Use CSS to break up long text with overflow-wrap (aka word-wrap) or word-break.

  • React without JSX

    14 August, 2019
    Time to read: 1 mins
    react

    I removed the JSX from the default CRA boilerplate for no particular reason.

  • Dark mode in React with Theme UI

    13 August, 2019
    Time to read: 3 mins
    gatsbyreact

    Learn how to implement dark mode in your Gatsby application fast with the Theme UI library.

  • Modals in Gatsby

    25 July, 2019
    Time to read: 4 mins
    gatsbyreact

    In this post, you’ll see how to create modals in Gatsby, and how to render them in different pages to improve SEO.

  • Change the URLs of posts in Gatsby

    17 July, 2019
    Time to read: 3 mins
    gatsbyreact

    Learn how to change the URLs of your pages in Gatsby.

  • Customize Google Font requests

    24 June, 2019
    Time to read: 4 mins
    typography

    You will learn how to customize your Google font requests through a practical example.

  • Working with data in Gatsby

    23 June, 2019
    Time to read: 6 mins
    reactgatsby

    You will see how you to work with data in Gatsby from hard coding them, to transformer plugins, and finally to MDX.

  • Storybook - Display code for render props components

    23 May, 2019
    Time to read: 1 mins
    reactstorybook

    We see a solution on how to display the correct code for render props components in Storybook.

  • Implementing dark mode in React

    13 May, 2019
    Time to read: 10 mins
    reactgatsby

    It may seem easy, but it’s deceptively hard to get it right. We break down 4 solutions for implementing dark mode in React.

  • Displaying hundreds of images with react-window and gatsby-image

    30 March, 2019
    Time to read: 6 mins
    reactgatsbyreact-window

    See how to display hundreds of images with react-window and gatsby-image by building an app that displays all the Hearthstone cards in a grid. You can also see the compromises you have to make.

  • A performance problem when you combine useReducer and useContext

    27 March, 2019
    Time to read: 8 mins
    reactreact-window

    We investigate a performance problem when using useReducer and useContext instead of redux and react-redux for application state management.

  • Deep copy vs shallow copy vs assignment operator

    07 March, 2019
    Time to read: 4 mins
    javascript

    We examine the differences between deep object copy, shallow copy, and assignment operator in JavaScript with code.

  • SEO + DX focused internationalization for Gatsby

    07 February, 2019
    Time to read: 4 mins
    reactgatsbyreact-intl

    Support multiple languages, and don’t compromise the SEO or the DX in your Gatsby application with react-intl.

  • Reveal animations on scroll with react-spring

    06 February, 2019
    Time to read: 5 mins
    reactreact-springreact-visibility-sensor

    Create reveal animations on scroll with react-spring and react-visibility-sensor.

  • Extremely fast loading with Gatsby and self-hosted fonts

    26 January, 2019
    Time to read: 4 mins
    gatsbytypographyperformance

    Drastically improve the load time of your Gatsby application with self-hosted fonts from the typefaces library.

  • Gatsby background image example

    25 January, 2019
    Time to read: 2 mins
    reactgatsby

    In this post, you learn how to use the gatsby-image component as a background image.

  • Dealing with line endings in Windows with Git and ESLint

    12 January, 2019
    Time to read: 9 mins
    GiteslintVS CodeWindows

    When you checkout a branch in Windows, Git may replace the line endings with CRLF. In this post, we’ll see how you can change it in LF and avoid the ESLint errors.

  • Configuring ESLint with Prettier

    04 January, 2019
    Time to read: 9 mins
    eslintprettierjavascript

    We’ll see 2 methods to configure ESLint with Prettier and write consistent and quality code.

  • Deploy a local WordPress site with the UpDraftPlus (free) plugin

    28 November, 2018
    Time to read: 4 mins
    wordpress

    In this post, we’ll see how you can use the popular UpDraftPlus plugin, to deploy a local WordPress site to a remote installation.

  • Four methods to keep a navbar at the top of the screen.

    25 November, 2018
    Time to read: 2 mins
    CSS

    See four methods you can use to keep a navigation bar at the top of the screen when the user scrolls down the page.

  • Using redux

    22 November, 2018
    Time to read: 9 mins
    reactredux

    Stop thinking about learning redux and learn by using it. In this post, we’ll break down some basic redux concepts while writing actual code.

  • Essential Gatsby plugins. Part 3, PWA/Styling and the rest.

    25 October, 2018
    Time to read: 6 mins
    reactgatsby

    In this post, we’ll see what plugins you can use to make your Gatsby app a PWA, style it and more.

  • Essential Gatsby plugins. Part 2, Markdown

    24 October, 2018
    Time to read: 6 mins
    reactgatsby

    In this post, we’ll see what plugins you can use in order to parse and display markdown files in your Gatsby app.

  • Essential Gatsby plugins. Part 1, SEO and Images

    23 October, 2018
    Time to read: 5 mins
    reactgatsby

    In this post, we’ll see what plugins you can use in order to improve the SEO of your Gatsby app and handle images effectively.

  • 📗 About
  • 🔥 GitHub
  • 🐦 Twitter
  • 📰 rss
Built with Gatsby. Icons made by Freepik from www.flaticon.com is licensed by CC 3.0 BY