Skip to content

Instantly share code, notes, and snippets.

View shadura's full-sized avatar
👋

Ruslan Shadura shadura

👋
View GitHub Profile
@shadura
shadura / selend.js
Created April 30, 2024 11:00 — forked from abdullah/selend.js
Selection End Event
let selectionEndTimeout = null,
event = new Event('selectionEnd');
document.addEventListener('selectionEnd', function (evt/*event*/) {
console.log("End selection!")
}, false);
[
"mouseup",

Installation

1)

brew install nginx
sudo cp /usr/local/Cellar/nginx/1.8.0/homebrew.mxcl.nginx.plist /Library/LaunchAgents

2)

Replace /usr/local/etc/nginx/nginx.conf with the nginx.conf in this gist. I'm using port 5000 for my current project. Obviously, change server_name as well, and probably the name of its access log.

// To disable editor warning put this inside .vscode/settings.json
{
"svelte.plugin.svelte.compilerWarnings": {
"a11y-aria-attributes": "ignore",
"a11y-incorrect-aria-attribute-type": "ignore",
"a11y-unknown-aria-attribute": "ignore",
"a11y-hidden": "ignore",
"a11y-misplaced-role": "ignore",
"a11y-unknown-role": "ignore",
@shadura
shadura / svelte.md
Created February 19, 2023 11:40 — forked from peltho/svelte.md
Svelte cheatsheet
@shadura
shadura / clear-cache.js
Created April 27, 2022 11:31 — forked from deanhume/clear-cache.js
Clear Service Worker Cache
if ('serviceWorker' in navigator) {
caches.keys().then(function(cacheNames) {
cacheNames.forEach(function(cacheName) {
caches.delete(cacheName);
});
});
}
@shadura
shadura / prettier-eslint-precommit.md
Created March 9, 2022 10:17 — forked from estorgio/prettier-eslint-precommit.md
Setting up Prettier and ESLint with pre-commit hook

Setting up Prettier and ESLint with pre-commit hook

  • Initialize Git repository
    git init
  • Create .gitignore file and add the following:
    node_modules/
    *.env