Skip to content

Instantly share code, notes, and snippets.

View unix14's full-sized avatar
馃憢
Hi there

Eyal Yaakobi unix14

馃憢
Hi there
View GitHub Profile
@unix14
unix14 / create_singleton.dart
Created February 6, 2025 14:27
This Dart script generates a singleton class file based on the provided class name from the command line. The generated class follows the singleton pattern and includes basic usage examples in the comments above the generated code.
import 'dart:io';
/// Singleton Generator Script
///
/// This script generates a singleton class file based on the provided class name
/// from the command line. The generated class follows the singleton pattern and
/// includes basic usage examples in the comments above the generated code.
///
/// Usage:
@davidHarush
davidHarush / ApplyTextColor.kt
Last active November 24, 2024 20:34
ApplyTextColor Composable Function
@Composable
fun ApplyTextColor( color: Color , content: @Composable () -> Unit) {
CompositionLocalProvider(LocalContentColor provides color) {
content()
}
}
// Example Usage
@Composable
fun ExampleUsage() {
@ardakazanci
ardakazanci / ScratchEffect.kt
Created January 1, 2024 16:55
Scratch Effect - Jetpack Compose
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContent {
SampleUiDesignForCartTheme {
ScratchCardView()
}
}
}
@unix14
unix14 / BagTripsCalculator.java
Created November 29, 2023 17:45
Small bags per trips calculator algorithm
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Random;
public class BagTripsCalculator {
// Default const values 1.01-3.0Kg
static final float MINIMUM_WEIGHT = 1.01f;
static final float MAXIMUM_WEIGHT = 3f;
@shahafc84
shahafc84 / TEMPLATE
Last active July 20, 2025 15:06
诪讚专讬讱 诇讛驻注诇转 讛转专讗讜转 驻讬拽讜讚 讛注讜专祝 讘Home Assistant
{{ states('input_text.redalert2') is defined and '专讞讜讘讜转' in states('input_text.redalert2') }}