Skip to content

Instantly share code, notes, and snippets.

View ngustavo's full-sized avatar
🏠
Working from home

Gustavo Nascimento ngustavo

🏠
Working from home
View GitHub Profile
@ngustavo
ngustavo / javascript.jsonc
Created February 12, 2024 10:24
VS Code JS User Snippets
{
// Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"console.log(\"\")": {
"prefix": "clg",
"body": [
"console.log(\"$1\")"
@ngustavo
ngustavo / course_duration.js
Created March 3, 2022 21:37
Udemy Course Duration Calculator
/*
Udemy Course Duration Calculator
Unlicensed
Usage: add this file as a browser bookmarklet or run it on console with your course open
*/
const ACCORDION_QUERY = '[id^="accordion-panel-title"]';
const ITEMS_QUERY = '[class*="curriculum-item-link--metadata"]';
const CHECKBOX_QUERY = '[data-purpose="progress-toggle-button"]';
@ngustavo
ngustavo / models-index.js
Last active March 15, 2024 14:36
Sequelize ES6 model loader for sqlite
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import Sequelize from 'sequelize';
const models = {};
const filename = fileURLToPath(import.meta.url);
const dirname = path.dirname(filename);
const basename = path.basename(filename);
@ngustavo
ngustavo / arvore.c
Last active March 19, 2018 17:54
Árvore Binária em C
#include <stdio.h>
#include <stdlib.h>
typedef struct eno {
int valor;
struct eno *esq;
struct eno *dir;
} No;
No *criar(int);
@ngustavo
ngustavo / onename
Created October 25, 2016 03:01
Verifying that "ngustavo.id" is my Blockstack ID. https://onename.com/ngustavo
Verifying that "ngustavo.id" is my Blockstack ID. https://onename.com/ngustavo