Skip to content

Instantly share code, notes, and snippets.

View JEuler's full-sized avatar
:shipit:

Ivan Terekhin JEuler

:shipit:
View GitHub Profile
@JEuler
JEuler / clean_arb_files.dart
Created August 9, 2025 10:54
Clearn ARB files from Metadata
#!/usr/bin/env dart
import 'dart:io';
import 'dart:convert';
void main() async {
final l10nDir = Directory('lib/l10n');
if (!await l10nDir.exists()) {
print('❌ lib/l10n directory not found');
@JEuler
JEuler / 01-update-docs.md
Created July 16, 2025 03:27 — forked from badlogic/01-update-docs.md
Yakety Documentation (Ordered) - LLM-optimized docs with concrete file references

Update Documentation

You will generate LLM-optimized documentation with concrete file references and flexible formatting.

Your Task

Create documentation that allows humans and LLMs to:

  • Understand project purpose - what the project does and why
  • Get architecture overview - how the system is organized
  • Build on all platforms - build instructions with file references
@JEuler
JEuler / 01-update-docs.md
Created July 16, 2025 03:27 — forked from badlogic/01-update-docs.md
Yakety Documentation (Ordered) - LLM-optimized docs with concrete file references

Update Documentation

You will generate LLM-optimized documentation with concrete file references and flexible formatting.

Your Task

Create documentation that allows humans and LLMs to:

  • Understand project purpose - what the project does and why
  • Get architecture overview - how the system is organized
  • Build on all platforms - build instructions with file references
@JEuler
JEuler / ViewBindingBaseFragment.kt
Created April 24, 2025 11:13
ViewBindingBaseFragment for ViewBinding usage in Fragments.
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.viewbinding.ViewBinding
/**
* Base fragment that handles ViewBinding lifecycle with enhanced safety mechanisms
*
@JEuler
JEuler / ReorderableListExample.swift
Created March 16, 2025 23:31
SwiftUI Reorder With Buttons List Example
import SwiftUI
// Simple example of a custom reordering implementation in SwiftUI
struct ReorderableListExample: View {
// Sample data
@State private var items = ["Item 1", "Item 2", "Item 3", "Item 4", "Item 5"]
@State private var isEditMode: EditMode = .inactive
var body: some View {
VStack {
@JEuler
JEuler / generate-favicon.js
Created December 20, 2024 02:16
Generate Favicons Node JS script
import sharp from 'sharp';
import path from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const sizes = [16, 32, 48, 64, 128, 256];
const inputFile = path.join(__dirname, '../public/logo.png');
const outputDir = path.join(__dirname, '../public');
@JEuler
JEuler / insert_ltr.py
Created November 29, 2024 05:50
Insert android:layoutDirection="ltr" to all xml in directory
import os
from lxml import etree
# List of tags to add android:layoutDirection="ltr"
ALLOWED_LAYOUT_TAGS = {"RelativeLayout", "LinearLayout", "FrameLayout", "ConstraintLayout"}
def process_xml_file(file_path):
try:
tree = etree.parse(file_path)
root = tree.getroot()
@JEuler
JEuler / gist:0ea3af22b95bd191c56780d1f67bc362
Created August 24, 2024 07:16
Git commit message prompt for Cursor
@Commit (Diff of Working State) Please generate a commit message that:",
“1. Summarizes the main purpose of the changes”,
“2. Follows best practices for commit message formatting”,
“3. Includes any relevant details about the implementation or impact”,
“4. Mentions any new files added or significant refactoring”,
“\nSuggested commit message format:”,
“<type>(<scope>): <subject>”,
“”,
“<body>”,
“”,
@JEuler
JEuler / Android Icons.jsx
Created May 5, 2024 07:01 — forked from pescode/Android Icons.jsx
Unity Icons Generator for Win Store, Android & iOS Photoshop Script
// Based on https://gist.github.com/appsbynight/3681050 by Matt Di Pasquale
// Author: Victor Corvalan
// http://twitter.com/pescadon
// This script will generate squares and wide Icons & Tiles required for Windows Store build on Unity3D
// Prepare 1 big icon of 512x512px
// Open this script with Photoshop -> File -> Scripts -> Browse
// Load your icon when prompted
var destFolder;
try
@JEuler
JEuler / extract.py
Created March 4, 2024 13:49
Extract .jpg files from folders in some current folder.
import os
import shutil
def extract_jpg_files(root_folder):
for root, dirs, files in os.walk(root_folder):
for file in files:
if file.endswith('.jpg'):
source_path = os.path.join(root, file)
destination_path = os.path.join(root_folder, file)
shutil.move(source_path, destination_path)