Skip to content

Instantly share code, notes, and snippets.

View reyrodrigez's full-sized avatar
🦚

Laszlo Heves reyrodrigez

🦚
View GitHub Profile
const transactionHistory = [
{
to: "0xd83a566e710da5256cd293f00f94709cab519bf5252ad298197bf32a7f68e82e",
from: "0x2f3ec022a7e947ee50b364ff052c07d5e816900e0e73224e04f7de8faab0ca93",
dateTime: 1526488945,
amount: 0.00012,
description: "lorem"
},
{
to: "0x85b3d743fbe4ec4e2b58947fa5484da7b2f5538b0ae8e655646f94c95d5fb949",
var festicketContainer = document.createElement('div');
festicketContainer.setAttribute('id', 'festicket-content');
festicketContainer.setAttribute('data-festival-series', 'black-sheep-festival');
festicketContainer.setAttribute('data-festival-edition', '2018');
festicketContainer.setAttribute('data-festival-domain', 'http://www.blacksheepfestival.com/');
festicketContainer.setAttribute('data-festival-referrer', 'black-sheep-festival');

document.querySelector('.entrioSingleWidgetContainer').appendChild(festicketContainer);
var festicketContainer = document.createElement('div');
festicketContainer.setAttribute('id', 'festicket-content');
festicketContainer.setAttribute('data-festival-series', 'black-sheep-festival');
festicketContainer.setAttribute('data-festival-edition', '2018');
festicketContainer.setAttribute('data-festival-domain', 'http://www.blacksheepfestival.com/');
festicketContainer.setAttribute('data-festival-referrer', 'black-sheep-festival');

document.querySelector('.entrioSingleWidgetContainer').appendChild(festicketContainer);

😍 Running a pre-commit eslint on all js files which have been staged for the given commit:

  "precommit": "git diff --name-only --cached | grep .js | xargs ./node_modules/.bin/eslint"

😭 wrap a set of elements in a DOM list.

$block.nextUntil('*:not(primitive-block)')
      .andSelf()
 .wrapAll('');
bait = window.document.createElement(‘div’);
adblock_detected = ‘off’;
bait.setAttribute(‘class’, ‘pub_300x250 pub_300x250m pub_728x90 text-ad textAd text_ad text_ads text-ads text-ad-links’);
bait.setAttribute(‘style’, ‘width: 1px !important; height: 1px !important; position: absolute !important;left: -10000px !important; top: -1000px !important;’);
bait.setAttribute(‘id’, ‘bait’);
window.document.body.appendChild(bait);
if (window.document.body.getAttribute(‘abp’) !== null || bait. offsetParent === null ||bait.offsetHeight === 0 || bait.offsetLeft === 0 || bait.offsetTop === 0 || bait.offsetWidth === 0 ||bait.clientHeight === 0 || bait.clientWidth === 0) {
adblock_detected = ‘on’;
}
if (window.getComputedStyle !== undefined) {