Skip to content

Instantly share code, notes, and snippets.

Avatar
:electron:
Expanding Lilac Studio's Team

Thiago de Bastos thiagodebastos

:electron:
Expanding Lilac Studio's Team
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am thiagodebastos on github.
  • I am thiagodebastos (https://keybase.io/thiagodebastos) on keybase.
  • I have a public key whose fingerprint is 11F7 C8F2 B7C8 07EF 54EF F6E5 1CE3 D4FB D8CB 4619

To claim this, I am signing this object:

@thiagodebastos
thiagodebastos / jsClosures.js
Created Nov 29, 2015
JavaScript Road Trip Part 3 Level 2 Challenge 4
View jsClosures.js
function mystery(input) {
var secret = 4;
input += 2;
function mystery2(multiplier) {
multiplier *= input;
return secret * multiplier;
}
return mystery2;
}
@thiagodebastos
thiagodebastos / BEM Stylus
Created Jun 4, 2016 — forked from paceaux/BEMify
Stylus BEM mixin
View BEM Stylus
e(name)
&__{name}
{block}
m(name)
&--{name}
{block}
.header
color: red
+e(element)
@thiagodebastos
thiagodebastos / yarn-update.sh
Last active Jun 9, 2017
Easily update Yarn to any version
View yarn-update.sh
# latest: yup
# release candidate: yup rc
# nightly: yup nightly
function yup {
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --"$1"
}
@thiagodebastos
thiagodebastos / Header.css
Created Jun 19, 2017
Animating React with GreenSock
View Header.css
.Header {
height: 50px;
max-width: 100%;
box-sizing: border-box;
border: 1px solid black;
color: white;
text-transform: uppercase;
background-color: rebeccapurple;
}
.isLoaded {
@thiagodebastos
thiagodebastos / domainRemoveDepositTaken.js
Created May 3, 2018
In Domain Property search, remove listings where deposit has been taken
View domainRemoveDepositTaken.js
(function () {
document.querySelectorAll('.search-results__listing').forEach(el => {
const price = el.querySelector('.listing-result__price') &&
el.querySelector('.listing-result__price').innerText.toLowerCase();
price === 'deposit taken' && el.remove();
})
})()
@thiagodebastos
thiagodebastos / eventBubbling.js
Last active May 13, 2018
JS BinEvent Bubbling and Propagation// source https://jsbin.com/salipuv
View eventBubbling.js
const grandParent = document.getElementById("grandParent")
const parent = document.getElementById("parent")
const counter = document.getElementById("counter")
let count = 0
function increaseCounter(event) {
event.preventDefault()
// if we don't stop propagation, the this function will run on both event listeners, thus increasing count by 2
// event.stopPropagation()
count += 1
@thiagodebastos
thiagodebastos / multiple_ssh_setting.md
Created Feb 14, 2019 — forked from RichardBronosky/multiple_ssh_setting.md
Multiple SSH keys for different github accounts
View multiple_ssh_setting.md

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@thiagodebastos
thiagodebastos / submodules.md
Created Mar 21, 2019 — forked from manasthakur/submodules.md
Using git submodules to version-control Vim plugins
View submodules.md

Using git-submodules to version-control Vim plugins

If you work across many computers (and even otherwise!), it's a good idea to keep a copy of your setup on the cloud, preferably in a git repository, and clone it on another machine when you need. Thus, you should keep the .vim directory along with your .vimrc version-controlled.

But when you have plugins installed inside .vim/bundle (if you use pathogen), or inside .vim/pack (if you use Vim 8's packages), keeping a copy where you want to be able to update the plugins (individual git repositories), as well as your vim-configuration as a whole, requires you to use git submodules.

Creating the repository

Initialize a git repository inside your .vim directory, add everything (including the vimrc), commit and push to a GitHub/BitBucket/GitLab repository:

cd ~/.vim
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions