Skip to content

Instantly share code, notes, and snippets.

View Lysak's full-sized avatar
🎯

Dmytrii Lysak

🎯
View GitHub Profile
@Lysak
Lysak / Task.php
Created February 19, 2026 16:13
php test task
<?php
//
// //count(array_filter($this->getUsers(), fn($user) => $user['city_id'] === $cityId));
class Test
{
/**
* Example:
* [
@Lysak
Lysak / queries.sql
Created February 19, 2026 16:05
sql test task
-- https://onecompiler.com/mysql/44e3ra35j
-- create
CREATE TABLE users (
id INTEGER PRIMARY KEY,
name varchar(255) NOT NULL,
email varchar(255) NOT NULL,
city_id INTEGER NOT NULL
);
@Lysak
Lysak / com.user.LangSwitcher.plist.md
Last active February 5, 2026 20:36
Keep Lang Switcher always running on macOS (launchd + AppleScript)

Keep Lang Switcher always running on macOS (launchd + AppleScript)

This setup ensures Lang Switcher 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 Lang Switcher launches.


⚙️ Installation

@Lysak
Lysak / react-live-coding.ts
Created February 2, 2026 18:41
react-live-coding.ts
import { useState, useEffect } from "react";
const useUserData = (userId) => {
const [user, setUser] = useState(null);
useEffect(() => {
const fetchUser = async () => {
const response = await fetch(`https://api.example.com/users/${userId}`);
const data = await response.json();
setUser(data);
@Lysak
Lysak / fizzbuzz.js
Created January 26, 2026 15:22
fizzbuzz.js
for (let i = 1; i <= 30; i++) {
const fizz = !(i % 3);
const buzz = !(i % 5);
if (fizz && buzz) console.log("FizzBuzz");
else if (fizz) console.log("Fizz");
else if (buzz) console.log("Buzz");
else console.log(i);
}
@Lysak
Lysak / example.json
Last active December 21, 2025 20:27
example.json
{
"schemaVersion": 1,
"label": "Codewars",
"labelColor": "#B1361E",
"message": "honor",
"color": "#B1361E",
"namedLogo": "codewars",
"logoColor": "white",
"style": "for-the-badge"
}
@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 February 23, 2026 22:28
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 February 11, 2026 10:54
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