A Pen by Peter Broschwitz on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Custom event listening | |
$(document).on('historyslider:initvideo', function (event) { | |
var args: any = [].slice.call(arguments), | |
players = args.length > 1 ? args[1] : $(); | |
_this.initVideo(players); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onScroll(): () => void { | |
var last, timeout, threshold = 100; | |
return () => { | |
var now = Date.now(); | |
if (last && now < last + threshold) { | |
window.clearTimeout(timeout); | |
timeout = window.setTimeout(function () { | |
last = now; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Factory Pattern</title> | |
<meta name="description" content="A framework for easily creating beautiful presentations using HTML"> | |
<meta name="author" content="Hakim El Hattab"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://cdn.rawgit.com/zloirock/core-js/master/client/shim.min.js"></script> | |
<script src="https://wzrd.in/standalone/tape@latest"></script> | |
<script src="https://wzrd.in/standalone/tap-browser-color@latest"></script> | |
<script src="http://fb.me/react-with-addons-0.14.3.js"></script> | |
<script src="http://fb.me/react-dom-0.14.3.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Pure functions</title> | |
</head> | |
<body> | |
<p>Reference: <a href="https://egghead.io/lessons/javascript-redux-pure-and-impure-functions">Egghead</a></p> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// keybindings.json | |
// Toggle between terminal and editor focus | |
{ "key": "ctrl+shift+oem_3", "command": "workbench.action.terminal.focus"}, | |
{ "key": "ctrl+shift+oem_3", "command": "workbench.action.focusActiveEditorGroup", "when": "terminalFocus"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Debug Unit Tests", | |
"runtimeExecutable": "npm", | |
"runtimeArgs": [ | |
"run-script", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Paste this for example to the console | |
window.addEventListener(“beforeunload”, function() { debugger; }, false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Parent iframe</title> | |
</head> | |
<body> | |
<h1>Parent iframe</h1> | |
<textarea id="log" width="40" height="30"></textarea> |