Skip to content

Instantly share code, notes, and snippets.

View Lysak's full-sized avatar
🎯

Dmytrii Lysak

🎯
View GitHub Profile
@Lysak
Lysak / com.user.googlechat.plist.md
Last active August 26, 2025 15:26
Keep Google Chat always running on macOS (launchd + AppleScript)

Keep Google Chat always running on macOS (launchd + AppleScript)

This setup ensures Google Chat is always running on macOS.
If the app crashes or is accidentally closed, it will automatically restart.
Unlike open -a, this method avoids stealing focus every time Google Chat launches.


⚙️ Installation

@Lysak
Lysak / biome.jsonc
Last active August 17, 2025 10:45
biome.jsonc file for the NestJS framework (2025), using Biome v2.2.0 and NestJS v11.1.6. Generated from ESLint and Prettier based on a basic NestJS configuration.
{
"$schema": "https://biomejs.dev/schemas/2.2.0/schema.json",
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
"files": { "ignoreUnknown": false },
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
@Lysak
Lysak / bulk‐rewriting commit authors.txt
Created May 4, 2025 13:32
bulk‐rewriting commit authors
install `pip install git-filter-repo`
### 1) Create a mailmap file
In your repo root, create e.g. `rewrite-mailmap.txt` with **Git’s mailmap syntax**, e.g.:
```
# Format: Proper Name <proper@email> <old@email>
Your New Name <new.email@example.com> <old.email@example.com>
```
@Lysak
Lysak / cursor-local.rules
Last active June 2, 2025 18:48
cursor-local.rules
- Answer in English
- Do not give high-level responses; your task is to provide concrete, project-applicable solutions
- Do not give detailed explanations, but describe the purpose of each change
- Before making changes, outline an implementation plan in bullet points, then proceed to implementation
- Follow linters when writing code
#github.com/QuantGeekDev/docker-mcp
@Lysak
Lysak / pre-commit
Created April 21, 2025 10:31
~/.git-hooks/pre-commit
#!/usr/bin/env bash
# Fetch Git configuration values
REMOTE_URL=$(git config --get remote.origin.url)
USER_EMAIL=$(git config user.email)
echo "🔍 Git Hook Running..."
echo "➡ Remote URL: $REMOTE_URL"
echo "➡ User email: $USER_EMAIL"
@Lysak
Lysak / crontab.txt
Last active April 14, 2025 13:41
laravel queue crontab with logging example
* * * * * cd /var/www/html2/laravel && sleep 5 && ./vendor/bin/sail php artisan queue:work --sleep=3 --tries=2 --max-time=3600 --stop-when-empty >> /var/www/html/laravel/storage/logs/crontab.log 2>&1
@Lysak
Lysak / launch-services-tabgroup.sh
Last active November 8, 2024 05:28
Launch Multi-Tab Terminal Processes for Development. This script automates the process of opening multiple Terminal tabs and running specific commands in each.
#!/usr/bin/env sh
osascript -e 'tell application "Terminal" to do script "cd /Users/Files/www/work/docker; ./docker/start.sh;"'
osascript -e 'tell application "Terminal" to do script "cd /Users/Files/www/work/angular; npm start;"'
osascript -e 'tell application "Terminal" to do script "cd /Users/Files/www/work/api; sleep 30; ./scripts/docker/queues.sh;"'
exit
@Lysak
Lysak / automatically_like_comments_at_youtube_studio.user.js
Last active March 20, 2023 10:36
Automatically like comments at studio.youtube.com
// ==UserScript==
// @name Automatically like comments at studio.youtube.com
// @namespace https://github.com/Lysak
// @version 0.2
// @author Dmytrii Lysak @Lysak
// @match https://studio.youtube.com/*
// @require https://code.jquery.com/jquery-3.6.3.min.js
// @grant none
// @run-at document-end
// @description Automatically like comments at studio.youtube.com (Code License: MIT License)
@Lysak
Lysak / Setting up a new Git Repo.md
Last active April 29, 2024 11:12
Setting up a new Git Repo

Setting up a new Git Repo

…or create a new repository on the command line

echo "# <reponame>" >> README.md
git init
gitmyname
git add README.md

git commit -m "first commit"

@Lysak
Lysak / array_diff_multidimensional.php
Created April 30, 2022 18:17
array_diff_multidimensional
function array_diff_multidimensional($arr1, $arr2): array
{
$check = is_array($arr1) && count($arr1) > 0;
$result = ($check) ? ((is_array($arr2) && count($arr2) > 0) ? $arr2 : []) : [];
if ($check) {
foreach ($arr1 as $key => $value) {
if (isset($result[$key])) {
$result[$key] = array_diff($value, $result[$key]);
} else {
$result[$key] = $value;