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
# home-manager module | |
{lib, pkgs, ...}: let | |
user = "you"; | |
toTOML = name: data: (pkgs.formats.toml {}).generate name data; | |
# all paths should be without trailing slashes | |
simpleSource = path: tags: { | |
source = path; # todo (v0.9): rename to sources and make list | |
tag = tags; # todo (v0.9): rename to tags |
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
[uBO 1.42.0] | |
! Title: Unobtrusive DeepL | |
! Homepage: https://gist.github.com/istudyatuni/96f0cc687e89b44208bed33c633564f7 | |
! Direct link: https://gist.githubusercontent.com/istudyatuni/96f0cc687e89b44208bed33c633564f7/raw/unobtrusive-deepl-ublock-filters.txt | |
www.deepl.com##footer | |
www.deepl.com###dl_quotes_container | |
www.deepl.com###dl_cookieBanner | |
www.deepl.com##.dl_visible_desktop_only | |
www.deepl.com##.dl_visible_handheld_only |
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 response = await fetch('/url') | |
const blob = await response.blob() | |
const a = document.createElement('a') | |
a.setAttribute('download', 'your-file.extension') | |
a.href = URL.createObjectURL(blob) | |
a.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
import os | |
import requests | |
import time | |
sid = '' | |
url = f'https://boxberry.ru/api/v1/tracking/order/get?searchId={sid}' | |
headers = { | |
'user-agent': 'Mozilla/5.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
let module | |
import('/path/to/module.js').then(m => module = m) |
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
let timerID = 0 | |
let ws = new WebSocket(url) | |
ws.onopen = () => { | |
// some code | |
keepAlive() | |
} | |
ws.onclose = () => { | |
// some code | |
cancelKeepAlive() | |
} |
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
<!-- крестик --> | |
<svg aria-hidden="true" class="svg-icon" width="18" height="18" viewBox="0 0 18 18"><path d="M15 4.41L13.59 3 9 7.59 4.41 3 3 4.41 7.59 9 3 13.59 4.41 15 9 10.41 13.59 15 15 13.59 10.41 9 15 4.41z"></path></svg> | |
<!-- or multiplication sign--> | |
<span>×</span> |
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
:root { | |
--text-color: #434343; | |
--border-color: #CDA6FC; | |
--main-bg-color: #fff; | |
--action-bg-color: #F0EEEE; | |
--hover-bg-color: #f0eeee; | |
} | |
.dark-mode { | |
--text-color: #F8F8F8; |
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
/* Colors */ | |
.error { | |
background-color: #FFBABA; | |
color: #D8000C; | |
} | |
.error:hover { | |
background-color: #FFA4A4; | |
} |
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 delay(ms: number) { | |
return new Promise( resolve => setTimeout(resolve, ms) ); | |
} | |
// call inside async function | |
await delay(300); | |
// not in async function | |
(async () => { | |
await delay(1000); |