Skip to content

Instantly share code, notes, and snippets.

View milichev's full-sized avatar

Vadym Milichev milichev

View GitHub Profile
@milichev
milichev / README.md
Last active January 30, 2026 18:06
Shell script for placing external display logically related to the main MacBook display

place-external-display.sh

Shell script for placing external display logically related to the main MacBook display

This script makes it easy to set hotkeys for switching the related logical position of an external display using displayplacer.

Installation

  1. Install the main part:
@milichev
milichev / PARSE_TRADERNET_DATA.gs
Created January 7, 2026 20:24
Tradernet.ua Cashflow Statements Parser
/**
* Parses Tradernet comments based on type codes.
* * @param {string[][]} comments The range of comments (J2:J).
* @param {string[][]} types The range of type codes (D2:D).
* @return {string[][]} Processed array of strings.
* @customfunction
*/
function PARSE_TRADERNET_DATA(comments, types) {
// 1. Guard against single-cell inputs or empty ranges
if (!Array.isArray(comments)) return [["Error: Input must be a range"]];
@milichev
milichev / bulkDeleteUnsolicitedCreations.js
Created November 27, 2025 19:57
Delete all unsaved creations in Google Photos
/**
* @fileoverview Google Photos Unsolicited Creations Bulk Deleter.
* * This script automates the deletion of all auto-generated, unsaved creations
* (Collages, Animations, Stylized Photos, etc.) found on the Google Photos
* unsaved creations page (https://photos.google.com/unsaved).
* * It handles:
* 1. Sequential deletion to avoid race conditions.
* 2. Virtual scrolling to load all items progressively.
* 3. Robust retry logic to confirm the visual removal of each item.
* * -----------------------------------------------------------------------------
@milichev
milichev / adblock-list.txt
Created May 5, 2025 15:37
adblock-filters
[Adblock Plus 2.0]
! Title: Vadym's custom ABP filters
! Description: Defines some AdBlock rules
! Version: 202505051600
! Last modified: 05 May 2025 16:00 UTC
! Expires: 1 day
! Homepage: https://github.com/milichev/adblock-filters
bt.rozetka.com.ua##RZ-TOP-PAGE-BANNER
bt.rozetka.com.ua##A[id="rz-banner"][class="exponea-banner exponea-popup-banner exponea-animate"][href="https://rozetka.com.ua/ua/promo/springcontinues/"]
www.olx.ua##.baxter-container
@milichev
milichev / README.md
Created November 14, 2024 15:31
Jest Matchers

Jets Matchers

Examples

Expect Matchers

expect(response).toEqualDeeplyContaining({status: 'OK', body: { orders: [{ id: 1}]}});
@milichev
milichev / TrackChangedDepsComponent.tsx
Created November 13, 2024 14:41
How to track the changed React hook deps between renders
// create an object with all the hook deps
const debug = useRef({
currentCampaignId,
data: getCampaignQuery.data,
getValues,
isInitialFormDataSettled,
reset,
setValue,
stepsData,
storageStepsState,
@milichev
milichev / eslint-ignore.js
Last active January 24, 2022 10:59
suppress react-hooks eslint warnings
/**
* Accepts eslint `stdout` and processes all error messages related to React Hooks, if any.
*
* Essentially, the "fix" is only about adding a respective `eslint-disable-line` comments to mute the error unless it is addressed appropriately.
*
* Requires the following modules available:
* - lodash
*
* Usage:
*
@milichev
milichev / Set-TextAnsiCodes.psm1
Last active April 24, 2020 23:55
ANSI Colors
<#
.SYNOPSIS
Provides possibility to colorize text in console using ANSI sequences.
#>
using namespace System.Drawing
function ToColor {
[CmdletBinding()]
param (
@milichev
milichev / InstallUtils.psm1
Created April 16, 2020 13:34
PowerShell utilities
#region Scripting
function Test-IsConsoleHost {
@('ConsoleHost', 'Visual Studio Code Host') -contains ($host.name)
}
function Get-PromptParam {
[CmdletBinding()]
param (
[string] $name,
const pipeData = function(fn) {
return function(data) {
return Promise.resolve(fn(data)).then(function(res) {
if (res === void 0) {
return data;
}
const keys = Object.keys(res).filter(function(prop) {
return res.hasOwnProperty(prop);
});
return Promise.all(keys.map(function(prop) {