Skip to content

Instantly share code, notes, and snippets.

View glauberramos's full-sized avatar

Glauber Ramos glauberramos

View GitHub Profile
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

10 weird tricks that React developers near you are using to create reusable components

https://www.youtube.com/watch?v=nQo0EdHNjto

  • reusable components
    • props over state
      • prop === state => problem!
    • stateless components
    • easy to unit test
  • PropTypes are serious
@lucashmsilva
lucashmsilva / TESOURODIRETO(taxa).js
Last active February 24, 2025 15:24
API para criar a função TESOURODIRETO Google Sheets
/*
* @return Retorna a cotação atual de um título específico do Tesouro Direto Junto com a taxa anual de retorno
* @customfunction
**/
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) {
@danperrout
danperrout / TesouroDireto.gs
Last active September 19, 2025 20:49
API Função TESOURODIRETO Google Sheets
/*
* @return Acesse radaropcoes.com Retorna a cotação atual de um título específico do Tesouro Direto.
* API: https://radaropcoes.com/
* Fonte: https://www.tesourodireto.com.br/titulos/precos-e-taxas.htm
**/
function TESOURODIRETO(bondName, argumento="r") {
let srcURL = "https://api.radaropcoes.com/bonds.json";
let jsondata = UrlFetchApp.fetch(srcURL);
let parsedData = JSON.parse(jsondata.getContentText()).response;
@bettysteger
bettysteger / jsPDF-with-emojis.js
Last active August 13, 2025 00:05
jsPDF-with-emojis.js
// PDF Configuration
const PDF_CONFIG = {
unit: 'px',
hotfixes: ['px_scaling'],
putOnlyUsedFonts: true,
compress: true
};
const PDF_MARGIN = 80;