Skip to content

Instantly share code, notes, and snippets.

View dioteos's full-sized avatar
🎯
Focusing

Anton Patrikeiev dioteos

🎯
Focusing
  • Ukraine, Vinnytsia
View GitHub Profile
@dioteos
dioteos / README.md
Created April 18, 2025 10:38
Run JS(X) to TS(X) migration for React

Convert JavaScript to TypeScript

Run Ratchet via jscodeshift to convert JavaScript/JSX files to TypeScript/TSX from any project directory, resolving paths correctly.

Setup

  1. Place ts-convert.js in scripts/.
  2. Add to package.json:

"scripts": {

@dioteos
dioteos / README.md
Created April 16, 2025 17:55
Allows to run linter in current directory

Run ESLint with Relative Paths

Run ESLint with --fix from any project directory, resolving paths correctly.

Setup

  1. Place lint-relative.js in scripts/.
  2. Add to package.json:
@dioteos
dioteos / settings.json
Created January 29, 2025 15:21
Color settings for vscode and it's forks. Good fit with dark themes
{
"workbench.colorCustomizations": {
// 🔴 Active Tab Customization
"tab.activeBorderTop": "#FF0000", // Red top border for the active tab to indicate focus
"tab.activeBackground": "#FF000044", // Semi-transparent red background for active tab for better visibility
// 🟡 Highlighting Unused Code
"editorUnnecessaryCode.border": "#FFFF00", // Yellow border to outline unused variables clearly
"editorUnnecessaryCode.background": "#FFFF0080", // Semi-transparent yellow background to indicate unused code
@dioteos
dioteos / open-wsl-ports.ps1
Created November 3, 2022 11:36
Open WSL2 Ports to LAN
# Elevate permissions
# https://stackoverflow.com/a/11440595/3191720
if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{
$arguments = "& '" +$myinvocation.mycommand.definition + "'"
Start-Process powershell -Verb runAs -ArgumentList $arguments
Break
}