Skip to content

Instantly share code, notes, and snippets.

@SamLeatherdale
SamLeatherdale / stan-watchlists.js
Created August 23, 2020 10:31
Import/export Stan Watchlists
// Wrap in IIFE for repeated usage
(function () {
const WATCHLISTS = {}; // Once exported, replace {} with your exported watchlist object
const ACTION = "import"; // or export
function getJwToken() {
const tokenEl = document.querySelector('[href*="jwToken"]');
const href = tokenEl.getAttribute("href");
const url = new URL(href);
return url.searchParams.get("jwToken");
@i-e-b
i-e-b / reset.txt
Created April 2, 2021 07:03
To reset "Dino World" Secret diary kid's toy
To reset dino world secret diary, hold 1, 3, and 0 together until it opens (about 3 seconds)
then enter new 4 digit code and press #

Var vs. Let

This Gist was automatically created by Carbide, a free online programming environment.

[You can view a live, interactive version of this Gist here](

Arrow functions

@kopecmi8
kopecmi8 / cell0.js
Last active May 6, 2024 10:46
template literals
var person = {
name: 'Michal',
surname: 'Kopecký',
}
var greetings = 'Hi, ' + person.name + ' ' + person.surname + '!';

Classes

@kopecmi8
kopecmi8 / cell0.js
Last active May 6, 2024 10:45
extended parameter handlling
function createProduct(price, productNumber, name, description) {
return {
price: price,
code: productNumber,
name: name,
desc: description
}
}
function discountCreateProduct(price, ...params) { ///tady se jedná o rest parameter
class="[a-zA-Z0-9:;\.\s\(\)\-\,]*"