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
// Unique creature types (https://scryfall.com/search?as=text…) | |
// | |
// Store | |
// | |
var k = 'tmp_types', ls = localStorage, n = document.querySelectorAll('.card-text-type-line'), s = new Set(ls.getItem(k)?.split(',') || []); ls.setItem(k, [...[...n].reduce((a,c) => a.add(c.innerText), s)]); | |
// | |
// Copy |
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> |
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
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
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
'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
<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
'.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
attr=['"]?\s*(?:\w+\s+)*\b(string)\b(?:\s+\w+)*\s*['"]? |
NewerOlder