Skip to content

Instantly share code, notes, and snippets.

View feroldi's full-sized avatar

Mário Feroldi feroldi

  • Reddening Games
  • São Paulo, Brazil
View GitHub Profile
@feroldi
feroldi / Code.gs
Created July 25, 2020 06:29 — forked from danperrout/TesouroDireto.gs
Função TESOURODIRETO Google Sheets
/*
* @return Retorna a cotação atual de um título específico do Tesouro Direto.
* Fonte: https://www.tesourodireto.com.br/titulos/precos-e-taxas.htm
**/
function TESOURODIRETO(bondName) {
let srcURL = "https://www.tesourodireto.com.br/json/br/com/b3/tesourodireto/service/api/treasurybondsinfo.json";
let jsondata = UrlFetchApp.fetch(srcURL);
let parsedData = JSON.parse(jsondata.getContentText()).response;
for(let bond of parsedData.TrsrBdTradgList) {
@feroldi
feroldi / rust_mem_profiling.md
Created October 15, 2019 13:32 — forked from HenningTimm/rust_mem_profiling.md
Memory profiling Rust code with heaptrack in 2019
// Problem:
//
// 1. Generate a sequence of N distributed random floating point numbers in the range [A, B].
// 2. Split it into evenly spaced M subsequences (i.e., M bins of N/M items each).
// 3. Make a histogram of each bin in parallel by counting from A to B how many fit in each b[i] in
// a range of B/M.
// 4. Merge all histograms back into one histogram of M.
use rand::distributions::uniform::SampleUniform;
use rand::Rng;

Iniciando PostgreSQL no Linux

Aviso: As instruções a seguir foram pesquisadas e executavas para funcionar com a distribuição ArchLinux.

Instale o pacote através de um gerenciador de pacotes:

# pacman -S postgresql
@feroldi
feroldi / springer-free-maths-books.md
Created December 29, 2015 14:19 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links