Skip to content

Instantly share code, notes, and snippets.

View HaQadosch's full-sized avatar
📓
Storybook

HaQadosch HaQadosch

📓
Storybook
View GitHub Profile
@HaQadosch
HaQadosch / walkXSteps.js
Created February 25, 2017 14:25
Working on this, need to make that stuff work
/*
* Map through a big array but act only once every X elts.
*/
const walkXSteps = (modulo, action) => {
let steps = 0
return () => {
if (steps === 0) {
action()
}
@HaQadosch
HaQadosch / DOM_Cloning.md
Last active February 27, 2017 11:40
Front End Best Practice

It may be more efficient to

  • first clone the entire DOM Node
  • make the changes to the clone
  • then replace the original with it

so you avoid multiple redraws and lower the CPU and memory load It also prevents ‘jittery’ changes to your page and Flashes Of Unstyled Content (FOUC).

@HaQadosch
HaQadosch / todo.md
Created March 3, 2017 18:08
Work in Progress

Add the grayscale css

Find the most basic lower limit rectify

// @flow
/* eslint array-callback-return: "error" */
/* eslint block-scoped-const: "error" */
/* eslint no-implied-eval: "error" */
/* eslint comma-style: ["error", "first"] */
/* eslint max-len: ["error", 200] */
/* eslint max-params: ["error", 4] */
/* eslint-env es6 */
/* eslint newline-per-chained-call: ["error", { "ignoreChainWithDepth": 2 }] */
/* eslint operator-linebreak: [2, "before"] */
@HaQadosch
HaQadosch / scratch.js
Last active April 6, 2017 22:34
mutationOberserver
// @flow
/*
div = `
<div class="AddressContainBut opContinue">
<input name="dnn$ctr102128$PersonalDetails$btnContinue" value="Continue" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(\"dnn$ctr102128$PersonalDetails$btnContinue\", \"\", true, \"\", \"\", false, false))" id="btnContinue" class="ContinueOn" type="submit">
<p>
<span class="glyphicon glyphicon-info-sign"></span>
You can review your order details on the confirm page.
</p>
</div>
@HaQadosch
HaQadosch / Addons.js
Last active April 28, 2017 17:25
addons
// <script>
const service = 'w{{$creative.waveId}}_fullfunnel-gamification'
window.optimost.services[service].opVariant1 = (trial, jQ) => {
try {
if (trial && jQ) {
window.optimost.services[service].creative = 1
if (!window.d3) {
window.jQuery.getScript('https://cdnjs.cloudflare.com/ajax/libs/d3/3.3.13/d3.min.js')
}
@HaQadosch
HaQadosch / delay.js
Created June 22, 2017 17:57
delay exp
// in augmentLoadList
/**
*Excluded Asset Details
*This arrays are for counters and experiments to be excluded/delayed from loading by default
*and later to be fired/loaded after dom assets are loaded
*Each array contains the parameters,
* type - if counter or experiment
* identifier - experiment subject name OR counter id
* (optional) cssselector - for experiments only
*/
@HaQadosch
HaQadosch / ax.css
Last active October 10, 2017 10:28
/**
element {
width: 746px;
height: 1478px;
}
element {
width: 400px;
height: 830px;
}
@HaQadosch
HaQadosch / ax.css
Created October 10, 2017 16:27
gigya test
body {
background: url(imagedoc-darknoise.png);
color: white;
margin: 0;
}
/** text background */
body:before {
content: 'GIGYA';
font-family: 'Archivo Black', sans-serif;
@HaQadosch
HaQadosch / setup.js
Created November 29, 2017 17:37
opConsoleVar1
// <script role="opConsoleSetup">
// Production steps of ECMA-262, Edition 5, 15.4.4.18
// Reference: http://es5.github.io/#x15.4.4.18
if (!Array.prototype.forEach) {
Array.prototype.forEach = function (callback /*, thisArg */) {
var T
var k
if (this == null) {
throw new TypeError('this is null or not defined')
}