Skip to content

Instantly share code, notes, and snippets.

View lucasinocente's full-sized avatar

Lucas Inocente lucasinocente

View GitHub Profile
@mrousavy
mrousavy / MEMOIZE.md
Last active April 22, 2024 19:26
Memoize!!! 💾 - a react (native) performance guide
In computing, memoization or memoisation
is an optimization technique used primarily
to speed up computer programs by storing
the results of expensive function calls and  
returning the cached result when the same
inputs occur again.                                         
                                                     — wikipedia
@visualglitch91
visualglitch91 / index.js
Created August 12, 2020 21:57
Delete all tweets
(async () => {
const twitterClientToken =
"AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA";
function getCookie(cname) {
const name = cname + "=";
const decodedCookie = decodeURIComponent(document.cookie);
let ca = decodedCookie.split(";");
for (let i = 0; i < ca.length; i++) {
@guilhermecomum
guilhermecomum / gs2json.js
Last active July 2, 2020 23:00
Google Spreadsheet to JSON
const data = require("./googlespreadsheet.json");
var columns = [];
var rows = {};
for (var i = 0; i < data.feed.entry.length; i++) {
var entry = data.feed.entry[i];
var value = entry.content.$t;
var row = entry["gs$cell"]["row"];
var col = entry["gs$cell"]["col"];
@kerryboyko
kerryboyko / README.md
Last active April 26, 2023 16:08
VueJS Best Practices Guide

Deverus Vue.js Style Guide

Guide for developing Vue.js applications.

v. 0.0.1

Vue.js is an amazing framework, which can be as powerful as Angular or React, the two big heavy hitters in the world of front-end frameworks.

However, most of Vue's ease-of-use is due to the use of Observables - a pattern that triggers re-renders and other function calls with the reassignment of a variable.

@crissilvaeng
crissilvaeng / README.md
Created May 9, 2016 19:40
Padrão e mensagens de commit.

Styleguides

Mensagens de commit styleguide

  • Usar modo imperativo ("Adiciona feature" não "Adicionando feature" ou "Adicionada feature")
  • Primeira linha deve ter no máximo 72 caracteres
  • Considere descrever com detalhes no corpo do commit
  • Considere usar um emoji no início da mensagem de commit

Emoji | Code | Commit Type

@derhuerst
derhuerst / awesome-twitter-bots.md
Last active April 7, 2023 17:45
Awesome Twitter Bots
@joseluisq
joseluisq / terminal-git-branch-name.md
Last active May 10, 2024 14:59
Add Git Branch Name to Terminal Prompt (Linux/Mac)

Add Git Branch Name to Terminal Prompt (Linux/Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
@mynameispj
mynameispj / .gitignore
Last active January 2, 2021 02:37
Git Ignore SASS cache files
# Ignore docs files
styles/.sass-cache
styles/.sass-cache/*
# Not working?
# Try: http://stackoverflow.com/questions/11451535/gitignore-not-working
# Try: http://stackoverflow.com/questions/1139762/gitignore-file-not-ignoring
@pbojinov
pbojinov / README.md
Last active December 8, 2023 21:09
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe

@branneman
branneman / app.js
Last active February 5, 2021 21:58
Node.js application entry-point files
#!/usr/bin/env node
'use strict';
var spawn = require('child_process').spawn;
var args = [
'--harmony',
'app/bootstrap.js'
];