Skip to content

Instantly share code, notes, and snippets.

View Igor-Lopes's full-sized avatar

Igor Oliveira Igor-Lopes

View GitHub Profile
@Igor-Lopes
Igor-Lopes / better-nodejs-require-paths.md
Created April 12, 2019 19:18 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@Igor-Lopes
Igor-Lopes / API.md
Created December 12, 2018 17:59 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@Igor-Lopes
Igor-Lopes / bovespa_intraday.py
Created October 31, 2018 23:16 — forked from maurobaraldi/bovespa_intraday.py
Cotações da Bovespa Intraday
#!/usr/bin/env python
from datetime import datetime
from json import loads
from time import gmtime, mktime, strptime
# LevelDict é um wrapper usando dicionário para LevelDB
# https://github.com/maurobaraldi/leveldict
from leveldict import LevelJsonDict
from requests import get
@Igor-Lopes
Igor-Lopes / bovespa.py
Created June 11, 2018 17:30 — forked from turicas/bovespa.py
Get stock prices from BMF Bovespa API
# coding: utf-8
# Copyright 2015 Álvaro Justen <https://github.com/turicas/rows/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,