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
/* This script passes data from OpenSky.com's main JS object to Desk.com via | |
* query params for a customized contact form loaded in an iframe (yuck). */ | |
/* Hide the iframe (if it’s not already hidden) */ | |
$(document.getElementById('desk-contact-iframe')).addClass('is-hidden'); | |
// http://www.joezimjs.com/javascript/3-ways-to-parse-a-query-string-in-a-url/ | |
var parseQueryString = function( queryString ) { | |
var params = {}, queries, temp, i, l; |
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
attr=['"]?\s*(?:\w+\s+)*\b(string)\b(?:\s+\w+)*\s*['"]? |
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
'.source.js': | |
'console.log': | |
'prefix': 'yo' | |
'body': 'console.log("[Yo Reyaz!] $1"$2);$3' |
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
<div ng-app="app"> | |
<div ng-controller="main"> | |
<div ng-repeat="type in types"> | |
<h1>{{type}} Lists</h1> | |
<div class="list" ng-class="{current: isCurrentList(type, $index)}" ng-repeat="list in lists | hasType:type"> | |
<div>{{list.created_on}}</div> | |
<ul> | |
<li ng-repeat="item in list.items | filter:{'type': type} | shouldLoadItem:isLoadedList(type, $index)">{{item}}</li> | |
</ul> |
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
'use strict'; | |
var player = (function () { | |
var privateIsPlaying = false; | |
var privateShouldBePlaying = false; | |
var privatePlaybackEndTimeout; | |
var privatePlaybackEndTimeoutDelay = 10000; | |
var privatePlaybackErrorTimeout; | |
var privatePlaybackErrorTimeoutDelay = Math.random(); |
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
function addStyling(string, styles) { | |
const chars = string.split(''); | |
const formatedChars = []; | |
const grid = {}; | |
for (const className in styles) { | |
grid[className] = []; | |
styles[className].forEach((range) => { | |
for (let i = range[0]; i <= range[1]; i++) { |
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
const assert = require('assert') | |
assert.deepEqual(flatten([[1,2,[3]],4]), [1,2,3,4]) | |
/** | |
* Returns a flattened array. | |
* @param {array} input | |
* @param {array=} output | |
*/ | |
function flatten (input, output = []) { |
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"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
* { | |
box-sizing: border-box; | |
} |
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"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
* { | |
box-sizing: border-box; | |
} |
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"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Untitled</title> | |
</head> | |
<body> | |
<div data-v-component="search"></div> | |
<script src="https://unpkg.com/vue@3"></script> |
OlderNewer