Skip to content

Instantly share code, notes, and snippets.

View haroldofurtado's full-sized avatar

Haroldo Furtado haroldofurtado

View GitHub Profile
@haroldofurtado
haroldofurtado / ubuntu20.md
Last active August 3, 2020 09:53 — forked from brycejohnston/ubuntu20.md
Ubuntu 20.04 Ruby and Elixir Development Setup

Ubuntu 20.04 Ruby and Elixir (and Misc) Development Setup

Guide to setting up a new Ubuntu 20.04 dev environment with Ruby, Elixir and Node.js installed with the asdf version management tool along with PostgreSQL & PostGIS.

Update system and install prerequisite packages

Some of these packages may already be installed

sudo apt-get install autoconf automake binutils build-essential curl \
 dirmngr dnsutils fonts-liberation fonts-liberation2 fontconfig g++ gcc gdal-bin git \
@haroldofurtado
haroldofurtado / 01_metodos_de_instancia.rb
Created October 26, 2020 21:24 — forked from serradura/01_metodos_de_instancia.rb
Ruby - Métodos de instância VS de classe VS lambda
class Calc
def sum(a, b)
a + b
end
def multiply(a, b)
a * b
end
end
@haroldofurtado
haroldofurtado / bash_strict_mode.md
Created August 24, 2022 11:50 — forked from vncsna/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation

set -e, -u, -o, -x pipefail

The set lines

  • These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
  • With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
  • set -euxo pipefail is short for:
set -e
set -u