Code with Hugo

Node.js and JavaScript Guides

  • Home
  • Books
  • Node
  • Testing
  • JavaScript
  • More...
  • Search
  • About
  • Gear & Setup
Subscribe
#git #bash #productivity

Change the date of a git commit

One of the greatest and worst things with git is that you can rewrite the history. Here’s a sneaky way of abusing that, I can’t think of a legitimate reason to do this. As with anything, thanks StackOverflow for all the options I can pick from 👍. ...

  • Hugo Di Francesco
    Author
1 min read
#cdn #dev-decoded #productivity

The step-by-step guide to create a domain redirect with Cloudflare

Redirecting a whole domain using Cloudflare can be useful but isn’t documented anywhere, here’s how to do it. ...

  • Hugo Di Francesco
    Author
1 min read
#python #graphql #web development

Python GraphQL client requests example using gql

An example consuming a GraphQL API from Python using gql. Full code example at HugoDF/python-graphql-client-example. ...

  • Hugo Di Francesco
    Author
1 min read
#deployment #meta #css #hugo

Switching the lights on: Hugo vs Hugo config files

A simple Hugo blog setup The story of getting codewithhugo.com up and running. The tl;dr is the following: I always rave about my blog setup, it’s simple, fast and just works I used Hugo, “The world’s fastest framework for building websites”, a static site generator I used a the ...

  • Hugo Di Francesco
    Author
8 min read
#jest #Testing #javascript

When to use Jest snapshot tests: comprehensive use-cases and examples 📸

There’s some nice use-cases for snapshot tests outside of the well-travelled React/Vue UI component ones. In other words, although React and Vue testing with snapshots is pretty well documented, that’s not the only place they’re useful. As a rule of thumb, you c ...

  • Hugo Di Francesco
    Author
6 min read
#tooling #git #ci #bash

Deploy to multiple environments with git and CircleCI

Easily deploying to multiple environments in a simple manner using GitHub, CircleCI and Heroku. Continuous Integration is awesome, but sometimes you need a buffer between auto-deploying things on merge and the production release. To do that with CircleCI requires some git branch- ...

  • Hugo Di Francesco
    Author
5 min read
#Redis #tooling

Install just redis-cli on Ubuntu, Debian, Jessie

As part of adding integration tests to an app on CircleCI I ran into the following issues: redis-cli’s API has changed from Redis CLI versions 2 to 3 to 4 ie. this works in v4 redis-cli -u ${REDIS_URL} but doesn’t in v2 the “only way” to install redis-cli is thr ...

  • Hugo Di Francesco
    Author
2 min read
#node #javascript #Express #Docker #redis

Bring Redux to your queue logic: an Express setup with ES6 and bull queue

There always comes a point in a web application’s life where an operation is best served in the background, this is where queues come in. There are a few queuing solutions in Node. None of them are ridiculously dominant, eg. Kue, RSMQ, Bee Queue, bull. The issue with Kue, R ...

  • Hugo Di Francesco
    Author
11 min read
#javascript #node

ES6 by example: a module/CLI to wait for Postgres in docker-compose

When using docker-compose, it’s good practice to make anything that relies on Postgres wait for it to be up before launching. This avoids connection issues inside the app. This post walks through how to deliver this functionality both as a CLI and a module that works both as a Co ...

  • Hugo Di Francesco
    Author
9 min read
#javascript #rxjs #reactive programming

Better HTTP Polling in JavaScript with RxJS 5

Here is the implementation for a function that takes a Promise-based fetch function (eg. using axios) and a function that decides if a response has been successful (from a polling perspective) and polls the fetch function until the isSuccess function returns true: ...

  • Hugo Di Francesco
    Author
2 min read
← Next Posts Page 12 of 14  Previous Posts →

Interested in Alpine.js?

Power up your debugging with the Alpine.js Devtools Extension for Chrome and Firefox. Trusted by over 15,000 developers (rated 4.5 ⭐️).

Install Now close
Code with Hugo
Latest Posts Github