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 tenses = { | |
present_tense: 'Presente', | |
preterite_tense: 'Pretérito', | |
imperfect_tense: 'Imperfecto', | |
future_tense: 'Futuro', | |
conditional_tense: 'Condicional', | |
subjunctive_mood: 'Subjuntivo', | |
} | |
// array of tuples of [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
// full explanation here: https://jsco.dev/blog/undo-across-multiple-stores-in-svelte | |
/* Use like this: | |
* import undoable, { undoTracker } from "./undoable.js"; | |
* const myStore = undoable(INITIAL_VALUE) | |
* if(undoTracker.can_undo) undoTracker.undo() | |
* if(undoTracker.can_redo) undoTracker.redo() | |
*/ | |
import {writable, derived, get} from "svelte/store" |
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 canvasMachine = Machine({ | |
id: 'canvas', | |
initial: 'idle', | |
context: { | |
elements: [], | |
targetEl: null, | |
}, | |
states: { |
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
[ | |
{ | |
"region":"Алтайский край", | |
"confirmed":[ | |
0, | |
0, | |
0, | |
0, | |
0, | |
0, |
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 timezones = [ | |
{ | |
"label": "Africa/Abidjan", | |
"utc_offset": "+00:00" | |
}, | |
{ | |
"label": "Africa/Accra", | |
"utc_offset": "+00:00" | |
}, | |
{ |
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
[...document.querySelectorAll(".invitation-card")].forEach(t=>{/recruit/gi.test(t.querySelector(".invitation-card__subtitle").textContent)?t.querySelector(".artdeco-button--tertiary").click():t.querySelector(".artdeco-button--secondary").click()}); |
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
[ | |
{ | |
"time": "2019-10-06T20:19:53.000Z", | |
"title": "9 Projects you can do to become a Frontend Master in 2020", | |
"tags": [ | |
"#react", | |
"#vue", | |
"#angular", | |
"#javascript" | |
], |
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
[...document.querySelectorAll('.invitation-card')].forEach(card => { | |
const jobTitle = card.querySelector('.invitation-card__subtitle').textContent | |
const isRecruiter = /recruit/gi.test(jobTitle) | |
const acceptButton = card.querySelector('.artdeco-button--secondary') | |
const denyButton = card.querySelector('.artdeco-button--tertiary') | |
if(isRecruiter){ | |
denyButton.click() | |
}else{ |
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 selectColor(number) { | |
const hue = number * 137.508 // use golden angle approximation | |
const saturation = '100%' | |
const lightness = '50%' | |
return `hsl(${hue},${saturation},${lightness})` | |
} |
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 _raf = | |
window.requestAnimationFrame || | |
window.webkitRequestAnimationFrame || | |
window.mozRequestAnimationFrame || | |
window.msRequestAnimationFrame || | |
window.oRequestAnimationFrame || | |
function(f) { | |
window.setTimeout(f, 1e3 / 60); | |
}; |
NewerOlder