One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
<script> | |
/** | |
* Provides a fake analytics object that sends all calls to the parent window for processing | |
*/ | |
var analytics = (function() { | |
var eventQueue = []; | |
// Send the events to the frame if it's ready. | |
function flush(method, args) { | |
while (eventQueue.length) { |
#!/bin/bash | |
yarn add -D @typescript-eslint/eslint-plugin \ | |
typescript ts-node-dev \ | |
@typescript-eslint/parser @typescript-eslint/eslint-plugin eslint eslint-config-prettier eslint-plugin-prettier eslint-plugin-vue prettier | |
cat > .eslintrc.js <<EOF | |
module.exports = { | |
root: true, | |
env: { |
<h1>Sorting colors</h1> | |
<p>Example from <a href="https://tomekdev.com/posts/sorting-colors-in-js">https://tomekdev.com/posts/sorting-colors-in-js</a>. Go there to learn more about sorting colors.</p> | |
<section class="box"> | |
<h2>Colors unsorted</h2> | |
<ul id="unsorted"></ul> | |
</section> | |
<section class="box"> | |
<h2>Colors sorted</h2> |
// Taken from https://stackoverflow.com/questions/55539387/deep-omit-with-typescript | |
/** Union of primitives to skip with deep omit utilities. */ | |
type Primitive = string | Function | number | boolean | Symbol | undefined | null | |
/** Deeply omit members of an array of interface or array of type. */ | |
export type DeepOmitArray<T extends any[], K> = { | |
[P in keyof T]: DeepOmit<T[P], K> | |
} |
/** | |
* Creates a dynamic instance of a specific class/prototype. | |
* Minor changes from initial solution shared by **Steve Fenton** | |
* | |
* WARNING: This solution don't works on Angular applications, | |
* using JIT (because the webpack don't compiles classes into window object) | |
* or AOT (js minification for production build) compilation. | |
* | |
* @see https://www.stevefenton.co.uk/2014/07/creating-typescript-classes-dynamically/ | |
*/ |
/** | |
* src/api/http.js | |
*/ | |
import axios from 'axios' | |
import qs from 'qs' | |
/** | |
* | |
* parse error response | |
*/ |
// input [[1,2,[3]],4] -> [1,2,3,4] | |
/** | |
* Assumptions | |
* 1. We don't need to take care of duplicates. | |
* 2. Arrays are only interger values. | |
* 3. No null or undefined values allowed. | |
*/ | |
function run(input) { |
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
//CSS | |
// XPath CheatSheet | |
// To test XPath in your Chrome Debugger: $x('/html/body') | |
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/ | |
// 0. XPath Examples. | |
// More: http://xpath.alephzarro.com/content/cheatsheet.html | |
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class |