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
@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
@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)),
);
@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) {
function onOpen() {
var sheet = SpreadsheetApp.getActiveSpreadsheet();
var entries = [{
name : "Refresh Categories",
functionName : "refresh_ynab_categories"
}];
sheet.addMenu("YNAB", entries);
};
function refresh_ynab_categories() {
@tecmaverick
tecmaverick / SqlDbType2DbType.cs
Last active March 23, 2022 04:47
Convert .Net Type to SqlDbType or DbType and vise versa
//Convert .Net Type to SqlDbType or DbType and vise versa
//This class can be useful when you make conversion between types .The class supports conversion between .Net Type , SqlDbType and DbType .
using System;
using System.Collections;
using System.Data;
namespace Devintelligence.Common.Data
{
/// <summary>
@stammy
stammy / index.xml
Created January 25, 2011 15:00
RSS Feed for Jekyll (feed/index.xml) - paulstamatiou.com
---
layout: nil
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title type="text" xml:lang="en">{{ site.root_desc }}</title>
<link type="application/atom+xml" href="http://paulstamatiou.com/feed/" rel="self"/>
<link type="text" href="http://paulstamatiou.com" rel="alternate"/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
@tacsio
tacsio / Git Configs
Last active September 15, 2022 01:10
My git config
git config --global user.name "Tarcisio Coutinho"
git config --global user.email "tcs5cin@gmail.com"
git config --global color.ui true
git config --global alias.s status
git config --global alias.c checkout
git config --global alias.b branch
git config --global alias.lol log --oneline --graph --decorate
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 [
@nicerobot
nicerobot / README.md
Last active February 25, 2024 02:41
Mac OS X uninstall script for packaged install of node.js from https://stackoverflow.com/a/9287292/23056

To run this, you can try:

curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh