Skip to content

Instantly share code, notes, and snippets.

Rafael Stavarengo stavarengo

Block or report user

Report or block stavarengo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@stavarengo
stavarengo / Auction_API.md
Last active Jun 11, 2019
Example of API documentation
View Auction_API.md

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 Feb 20, 2019
Git alias to remove from your local repostitory all branches and tags that does not exists on remote. Call it with `git pa`
View .gitconfig
[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 Dec 8, 2016 — forked from kentbrew/node-on-ec2-port-80.md
How I Got Node.js Talking on EC2's Port 80
View node-on-ec2-port-80.md

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 Nov 13, 2019
List of portuguese words and their respective synonyms. More at https://github.com/stavarengo/portuguese-brazilian-synonyms
View brazilian-synonyms.json
{
"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",
You can’t perform that action at this time.