Skip to content

Instantly share code, notes, and snippets.

View iuriguilherme's full-sized avatar

Iuri Guilherme iuriguilherme

View GitHub Profile
@iuriguilherme
iuriguilherme / backup.sh
Created January 5, 2021 21:00
Backup folders using tar
#!/bin/bash
if [ ! -z $2 ]
then
SOURCE_PATH="$(dirname $1)"
SOURCE_DIR="$(basename $1)"
DEST_PATH="$(dirname $2)"
DEST_FILE="$(basename $2).tar.xz"
XZ_OPT=-e9 ionice -c 2 -n 7 nice -n 19 tar -cJhvpnS -C "${SOURCE_PATH}" \
"${SOURCE_DIR}" -f "${DEST_PATH}/${DEST_FILE}"
@iuriguilherme
iuriguilherme / keybase.md
Last active December 22, 2020 23:45
Keybase proof

Keybase proof

I hereby claim:

  • I am iuriguilherme on github.
  • I am iuriguilherme (https://keybase.io/iuriguilherme) on keybase.
  • I have a public key ASAw1O4LqUQTcrv9RiIx5k5YhyzhlY0kp2-ay5M85dZ7Owo

To claim this, I am signing this object:

@iuriguilherme
iuriguilherme / app.py
Last active January 17, 2024 16:40
FastAPI and Quart together
#!/usr/bin/env python
## FastAPI is a great tool for... fast APIs... but there are better
## solutions for web apps such as Django, Web2Py and Flask. Talking
## about Flask, there is the Quart project which aims to be the full
## async version of Flask that you can use today.
##
## I have read the following documentation to reach the result of this
## gist:
##
## * <https://fastapi.tiangolo.com/tutorial/middleware/>

Keybase proof

I hereby claim:

  • I am desci on github.
  • I am iuriguilherme (https://keybase.io/iuriguilherme) on keybase.
  • I have a public key whose fingerprint is BE63 A69B 71FA 985A 2384 24DD E23E 7EC0 76CB DC46

To claim this, I am signing this object: