Skip to content

Instantly share code, notes, and snippets.

View joellobo's full-sized avatar

Joel Lobo joellobo

View GitHub Profile
@taylor-jones
taylor-jones / vs_curl.py
Created September 22, 2019 19:47
Download the latest versions of all installed VS Code extensions w/ cURL
"""
Download the latest versions of all installed VSCode extensions with cURL.
TODO: Add option to automatically install all the downloaded extensions.
TODO: Add option to provide any list of extensions, not just the installed ones.
TODO: Update to allow for specifying extension version (but default to latest version).
TODO: Update to check for directory existence (and make one if it doesn't exist).
"""
import os
const IS_TEST = process.env.NODE_ENV === 'test';
const ONE_SECOND_TIMEOUT = 1000;
class Util {
static async delayedCall(fn, params, time = ONE_SECOND_TIMEOUT) {
return new Promise((resolve, reject) => setTimeout(() => {
fn(...params)
.then(resolve)
.catch(reject);
}, time));
@rponte
rponte / using-uuid-as-pk.md
Last active October 14, 2025 19:17
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes

String divTemplate =
"""
<div class=\"card text-white bg-dark mb-3\" style=\"max-width: 18rem;\">
<h4 class=\"card-header\">%s</h4>
<div class=\"card-body\">
<img class=\"card-img\" src=\"%s\" alt=\"%s\">
<p class=\"card-text mt-2\">Nota: %s - Ano: %s</p>
</div>
</div>
""";