Skip to content

Instantly share code, notes, and snippets.

View ErickPetru's full-sized avatar
🎯
Focusing

Erick Eduardo Petrucelli ErickPetru

🎯
Focusing
View GitHub Profile
@ErickPetru
ErickPetru / bookmarklet-css-layout-hints.js
Last active September 4, 2019 20:26 — forked from vcastroi/css-layout-hack.js
Easy-To-Use Bookmarklet to Toogle CSS Layout Hints On/Off
/* Easy-To-Use Bookmarklet to Toogle CSS Layout Hints On/Off
* Thanks to: https://dev.to/gajus/my-favorite-css-hack-32g3 and https://gist.github.com/vcastroi
* Usage: create a new bookmarklet (inside your browser Bookmark Manager) and use the folowing code as the bookmark URL:
*/
javascript: (function () {
const DEPTH = 10, els = document.body.getElementsByTagName('*'), items = [];
let selector = '', style = '*{color:#000!important;outline:1px solid #f00!important;outline-offset:-2px;background-color:#fff!important;}\n';
for (let el of els) el.innerHTML.indexOf(style) !== -1 && items.push(el);
if (items.length > 0) items.forEach(item => item.innerHTML = '');
else {
@ErickPetru
ErickPetru / keep-fork-updated.md
Last active September 13, 2019 13:14 — forked from CristinaSolana/gist:1885435
Keeping the "vuejs-br/br.vuejs.org" fork up to date with the upstream "vuejs/vuejs.org" repository.

1. Clone your fork, if you didn't it yet:

git clone [email protected]:vuejs-br/br.vuejs.org.git

2. Add remote from original repository in your forked repository:

cd into/cloned/br.vuejs.org
git remote add upstream git://github.com/vuejs/vuejs.org.git
git fetch upstream
var currencyValidator = {
format: function (number) {
return (Math.trunc(number * 1000000000000) / 1000000000000).toFixed(2)
},
parse: function (newString, oldNumber) {
var CleanParse = function (value) {
return { value: value }
}
var CurrencyWarning = function (warning, value) {
return {