Skip to content

Instantly share code, notes, and snippets.

View danguilherme's full-sized avatar
👨‍💻
npx danguilherme

Guilherme Ventura danguilherme

👨‍💻
npx danguilherme
View GitHub Profile
function onOpen() {
var sheet = SpreadsheetApp.getActiveSpreadsheet();
var entries = [{
name : "Refresh Categories",
functionName : "refresh_ynab_categories"
}];
sheet.addMenu("YNAB", entries);
};
function refresh_ynab_categories() {
function YNABAccounts(accessToken, budgetId) {
const accounts = _getBudgetAccounts(accessToken, budgetId);
if(accounts == null) {
return null;
}
const columns = ["Name", "Type", "Budget", "Closed", "Balance"];
const rows = accounts.map(function (acc) {
return [
@xialvjun
xialvjun / setIn.js
Last active February 23, 2021 18:23
immutable version of lodash/set
// https://github.com/lodash/lodash/issues/1696
import {clone, setWith, curry} from 'lodash/fp';
// export const setIn = curry((path, value, obj) =>
// setWith(clone, path, value, clone(obj)),
// );
export const setIn = curry((obj, path, value) =>
setWith(clone, path, value, clone(obj)),
);
@danguilherme
danguilherme / git_configs.sh
Last active July 25, 2018 18:27 — forked from tacsio/Git Configs
My git config
git config --global user.name "Guilherme Ventura"
git config --global user.email "guilhermeventura2@gmail.com"
git config --global push.default simple
git config --global color.ui true
git config --global alias.s status
git config --global alias.c checkout
git config --global alias.co checkout

Git Cheat Sheet

Commands

Getting Started

git init

or

@staltz
staltz / introrx.md
Last active April 15, 2024 10:24
The introduction to Reactive Programming you've been missing
@simonellistonball
simonellistonball / isin-validator.js
Created February 5, 2014 12:00
ISIN validation in javascript
/**
* @author sellistonball
*/
/**
* Calculates a check digit for an isin
* @param {String} code an ISIN code with country code, but without check digit
* @return {Integer} The check digit for this code
*/
function calcISINCheck(code) {
@rxaviers
rxaviers / gist:7360908
Last active April 16, 2024 05:32
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@atenni
atenni / README.md
Last active April 14, 2024 01:34
How to permalink to a gist's raw file

Problem: When linking to the raw version of a gist, the link changes with each revision.

Solution:

To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/

To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]