Skip to content

Instantly share code, notes, and snippets.

@lcfumes
lcfumes / description.md
Created September 28, 2021 21:27 — forked from jullyanafialho/description.md
Números por Extenso

Challenge Description

Fazer uma função que receba um número inteiro entre 0 e 999 e retorne uma string, que é esse número por extenso em português.

Exemplo:

  • Tendo como entrada o número 235, esperamos a resposta: duzentos e trinta e cinco.
  • Tendo como entrada o número 23, esperamos a resposta: vinte e três.
  • Tendo como entrada o número 5, esperamos a resposta: cinco.
@lcfumes
lcfumes / git-branches-by-commit-date.sh
Created May 11, 2018 22:45 — forked from jasonrudolph/git-branches-by-commit-date.sh
List remote Git branches and the last commit date for each branch. Sort by most recent commit date.
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r
@lcfumes
lcfumes / configure_docker0.sh
Last active August 1, 2016 01:48
Change the IP subnet of Docker's docker0 interface
#!/bin/sh -e
#
# You can run this script directly from github as root like this:
# curl -sS https://gist.github.com/lcfumes/6af9e321ef062ef4892dc83f6585d5c1/raw/configure_docker0.sh | sudo bash -s - 172.31.0.21/16
#
# * Make sure you replace "192.168.254.0/24" with the network that you want to use
#
# NOTE: This script is intended for Debian / Ubuntu only!
if [ $# -lt 1 ]; then