Skip to content

Instantly share code, notes, and snippets.

View Lysak's full-sized avatar
🎯

Dmytrii Lysak

🎯
View GitHub Profile
@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 <[email protected]> <[email protected]>
```
@Lysak
Lysak / cursor-local.rules
Last active May 4, 2025 13:32
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;
@Lysak
Lysak / automatically_add_cookie_param_to_selected_sites.user.js
Last active March 20, 2023 10:37
automatically_add_cookie_param_to_selected_sites.user.js
@Lysak
Lysak / automatically_enable_filter_just_my_tasks_in_asana_project.user.js
Last active February 15, 2023 00:45
Automatically enable filter "Just my tasks" in Asana project
// ==UserScript==
// @name Automatically enable filter "Just my tasks" in Asana project
// @namespace https://github.com/Lysak
// @version 0.1.5
// @description Automatically enable filter "Just my tasks" in Asana project (Code License: MIT License)
// @author Dmytrii Lysak @Lysak
// @match https://app.asana.com/*
// @icon https://www.google.com/s2/favicons?domain=asana.com
// @grant none
// @noframes