Skip to content

Instantly share code, notes, and snippets.

Avatar

Paulo Jerônimo paulojeronimo

View GitHub Profile
View math-curiosity.sh
#!/usr/bin/env bash
cat <<'EOF'
If we divide 1 by 998001 we get the number ".000 001 002 003 ... 997 999 ...".
Look how curious: the 998 simply disappears!
Want proof? Read the code of this script!
Read more: https://www.linkedin.com/feed/update/urn:li:activity:6954872558508732416/
EOF
View keybase.md

Keybase proof

I hereby claim:

  • I am paulojeronimo on github.
  • I am paulojeronimo (https://keybase.io/paulojeronimo) on keybase.
  • I have a public key ASBCJ16fy6V052sD0-0Q6mAbchT7rS8UmXjEngLFFV-LsAo

To claim this, I am signing this object:

@paulojeronimo
paulojeronimo / httpd-3ways.adoc
Created March 14, 2022 08:31
Three ways to run a simple HTTP server on port 3000 with three different languages
View httpd-3ways.adoc

Using Node.js (and the package serve)

$ serve -s .

Using Python 3

$ python3 -m http.server 3000
@paulojeronimo
paulojeronimo / .docker-asciidoctor-builder
Last active December 19, 2022 18:23
docker-asciidoctor-builder
View .docker-asciidoctor-builder
#!/usr/bin/env bash
BUILD_DIR=${BUILD_DIR:-build}
ADOC=${ADOC:-README.adoc}
REMOTE_REPO=${REMOTE_REPO:-`git config --get remote.origin.url`} || :
GENERATE_PDF=${GENERATE_PDF:-false}
HTML_NAME=${HTML_NAME:-index.html}
PDF_NAME=${PDF_NAME:-`basename "$BASE_DIR".pdf`}
SERVE_PORT=${SERVE_PORT:-5001}
MAIN_BRANCH=${MAIN_BRANCH:-main}
@paulojeronimo
paulojeronimo / create-my-links
Last active November 22, 2020 14:25
Script create-my-links #bash
View create-my-links
@paulojeronimo
paulojeronimo / README.md
Created November 9, 2020 10:11 — forked from typebrook/README.md
[bash-gist] A bash script for gist management #bash #gist
View README.md
@paulojeronimo
paulojeronimo / virtualbox-mount
Last active February 16, 2021 16:54
Scripts to mount my VM shared folders (VMware Fusion or VirtualBox) #bash
@paulojeronimo
paulojeronimo / Dockerfile
Created March 25, 2020 13:36 — forked from yogeek/Dockerfile
Gosu usage in Docker
View Dockerfile
FROM ubuntu
RUN apt-get install ...
# grab gosu for easy step-down from root
ENV GOSU_VERSION 1.10
RUN set -x \
&& curl -sSLo /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
&& curl -sSLo /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
&& export GNUPGHOME="$(mktemp -d)" \
@paulojeronimo
paulojeronimo / 2018-05-28.20-minutes-running.yml
Created May 28, 2018 14:36
20 minutes running on 2018-05-28
View 2018-05-28.20-minutes-running.yml
20 minutes running:
warm up (A):
time: 5 min
velocity: 8.5 km/h
serie:
repetitions: 2
itens:
- sprint (B):
time: 1 min
velocity: 13 km/h
@paulojeronimo
paulojeronimo / Transformer.java
Last active May 1, 2018 07:18
transformer-extras
View Transformer.java
package io.spring.stream.sample;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Processor;
import java.util.HashMap;
import java.util.Map;