Skip to content

Instantly share code, notes, and snippets.

View stavarengo's full-sized avatar

Rafael Stavarengo stavarengo

View GitHub Profile
@stavarengo
stavarengo / Auction_API.md
Last active June 11, 2019 15:46
Example of API documentation

Auction API

The Auction API allows you to manipulate lots, bids in an auction. The operations you can do, through the API, are:

  • Create a new lot: [POST /lot];
  • Changes information of the lot: [PUT /lot/:LOT_ID];
  • Starts the auction of a lot: [POST /auction/:LOT_ID];
  • Bids on a lot: [POST /bid/:LOT_ID];
  • List the bids of a lot: [GET /bid/:LOT_ID];
  • Delete a lot: [DELETE /lot/:LOT_ID].
@stavarengo
stavarengo / .gitconfig
Last active February 20, 2019 17:23
Git alias to remove from your local repostitory all branches and tags that does not exists on remote. Call it with `git pa`
[credential]
# Never as for you password again.
# When 'store' your password will be store in the file '$HOME/.git-credentials' in plain text (no encriptation),
# because of this, you must use a personal access token, generated here: https://github.com/settings/tokens
helper = store
[gui]
encoding = utf-8
[core]
@stavarengo
stavarengo / node-on-ec2-port-80.md
Last active December 8, 2016 09:12 — forked from kentbrew/node-on-ec2-port-80.md
How I Got Node.js Talking on EC2's Port 80

The Problem

Standard practices say no non-root process gets to talk to the Internet on a port less than 1024. How, then, could I get Node talking on port 80 on EC2? (I wanted it to go as fast as possible and use the smallest possible share of my teeny tiny little micro-instance's resources, so proxying through nginx or Apache seemed suboptimal.)

The temptingly easy but ultimately wrong solution:

Alter the port the script talks to from 8000 to 80:

}).listen(80);
@stavarengo
stavarengo / brazilian-synonyms.json
Last active April 21, 2021 11:28
List of portuguese words and their respective synonyms. More at https://github.com/stavarengo/portuguese-brazilian-synonyms
{
"synonyms": [
"abade,confessor,cura,pároco",
"abadejo,abadiva,badejo",
"abadia,convento,mosteiro",
"abaixa-língua,cataglosso,glossocátoco",
"abaixamento,baixa,diminuição,redução",
"afastamento,desaparecimento",
"aforia,esterilidade,infecundidade,infertilidade",
"agatanhadura,agatanhamento,arranhadura",