Skip to content

Instantly share code, notes, and snippets.

View ackvf's full-sized avatar
🏡
Remote Fullstack Node.js / Frontend React.js

Qwerty (Vítězslav Ackermann Ferko) ackvf

🏡
Remote Fullstack Node.js / Frontend React.js
View GitHub Profile
@ackvf
ackvf / youtube-fullscreen-scroll.js
Last active August 28, 2025 17:42
Bring back the Scroll Down feature in Full Screen YouTube videos.
// ==UserScript==
// @name YouTube: Bring back Full Screen Scroll Down
// @namespace qwerty.xyz
// @version 1.2025-08-28
// @description Bring back the Scroll Down feature in Full Screen YouTube videos.
// @author Qwerty <[email protected]>
// @source https://gist.github.com/ackvf/2b4f71534c8131713b51c5f6056d472b
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @match https://www.youtube.com/*
// @match https://youtube.com/*
@ackvf
ackvf / ComponentWithGenerics.tsx
Last active January 31, 2025 01:11
React utils
// Jan 2023
/**
* Provides better intellisense for JSX Components at call-site by allowing them to accept additional generics.
*
* In some cases it also switches `onChange` handler from `(value: string) => void` to `(event: HTMLInputEvent<..>) => void`
* to be used with `useFormState()` hook's e.g. `onInputChange` which accepts `EventStub` (`(ev: { target: { name, value }}) => void`).
*
* @example
* interface FormState {a, b}
*
@ackvf
ackvf / README.md
Last active November 5, 2024 20:00
TS/JS utility functions

TS/JS utility functions

other gists
🔗 TypeScript type toolbelt
🔗 React utils


  • accessTrap - Object and Array Proxy to count number of property accesses to map used/unused properties. It maintains referential stability using a caching mechanism to not disrupt React.js render flow.
@ackvf
ackvf / README.md
Last active February 3, 2025 23:15
Bookmarklets and script snippets
@ackvf
ackvf / README.md
Last active January 26, 2024 05:10
Crypto scripts
@ackvf
ackvf / README.md
Last active April 13, 2022 16:26
eToro scripts

How to use this?

enable balance

Create new Bookmark

add new bookmark page

Edit Bookmark details

@ackvf
ackvf / README.md
Last active March 6, 2025 18:01
TypeScript type toolbelt
@ackvf
ackvf / CommService.ts
Created February 10, 2021 15:19
Services
import CoreAPIService from './CoreAPIService';
import { CommentInterface } from '../interfaces/requestInterface';
class CommService {
// CREATE
addCommentToRequest = async (requestId: number, data: FormData) =>
CoreAPIService.post(`comments/${requestId}`, data, { 'Content-Type': 'multipart/form-data' })
.then<CommentInterface>(response => response.data);
@ackvf
ackvf / compose-functions.ts
Last active April 29, 2020 11:42
Typed compose
/**
* @name compose
* @summary Composes Higher-Order-Functions from right to left so that they are executed from left to right.
* note: To compose Higher-Order-Components, use compose.ts
*
*
* @description
* Two overloads are available:
* A) Matches the composed signature of whole compose to the wrapped function.
* B) As an escape hatch, it is possible to explicitly define the resulting OuterSignature with a generic, ignoring the HOFs types.
@ackvf
ackvf / eventloop.js
Last active November 14, 2019 17:30
Understanding the Event Loop
function callback(arg) {
setTimeout(console.log, 0, arg, ' # 4 timeout ');
setImmediate(console.log, arg, ' # 5 immediate');
process.nextTick(console.log, arg, ' # 2 nextTick ');
(async () => { await undefined; console.log(arg, ' # 3 await '); })();
console.log(arg, '# 1 sync ');
}
setTimeout(callback, 0, ' # 4 timeout ');
setImmediate(callback, ' # 5 immediate');