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 / event_gallery_analytix_manager_missing_events_finder.py
Created April 27, 2025 19:24
find missing analytix code on click events
@unix14
unix14 / event_gallery_img_downloader
Created April 2, 2025 13:14
The Event Gallery Image Downloader is a batch script designed to efficiently fetch files from Google Cloud Storage (GCS) and download them to a local directory. This tool is particularly useful for automatically fetching image files from GCS buckets for use in event gallery ( private project ).
@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:
@unix14
unix14 / error_popup.dart
Created February 4, 2025 12:24
This file defines the ErrorPopup class for displaying error popups in a Flutter app. The ErrorPopup class has a static method open to show an AlertDialog with customizable title, description, and optional cancel and OK buttons. The dialog can be cancelable, and custom actions can be executed when the OK or Cancel buttons are pressed.
import 'package:flutter/material.dart';
class ErrorPopup {
static void open(BuildContext context, String title, String description,
{bool isCancelable = false,
Function? onOk,
Function? onCancel,
String okText = 'OK',
String cancelText = 'Cancel'}) {
@unix14
unix14 / logger.dart
Created January 26, 2025 13:51
A simple colorized logger for Dart. dependent on ansi_styles library.
import 'package:ansi_styles/ansi_styles.dart';
//*** Enums ***//
/// This enum is used to define the log level
/// It has four values: debug, error, warning, info
enum LogLevel {
info,
debug,
warning,
@unix14
unix14 / feature_generator.dart
Last active February 10, 2025 15:13
This Dart script generates a feature folder structure for a Flutter project. It creates the necessary folders and files based on the provided feature name and optional components (screens and widgets). If no components are specified, it generates the entire structure.
/// Feature Generator Script
///
/// This script generates a feature folder structure for a Flutter project.
/// It creates the necessary folders and files based on the provided feature name
/// and optional components (screens and widgets). If no components are specified,
/// it generates the entire structure.
///
/// Usage:
///
/// To generate the entire feature structure:
@unix14
unix14 / 404.html
Created October 28, 2024 17:03
Custom 404 error page with a bouncing ball animation, a message, and a button to redirect users back to the main site. Styled with internal CSS and includes a media query for responsiveness.
<!DOCTYPE html>
<html>
<head>
<title>404 Not Found</title>
<style>
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
@unix14
unix14 / smart_image_uploader.dart
Last active October 9, 2024 12:09
SmartImageUploader class in the Dart file provides a method to upload a file to Firebase. It first opens a file picker for the user to select a file. After a file is selected, it extracts the file extension and appends it to the provided path. Then, it uploads the file to Firebase Storage. If the upload is successful, it retrieves and returns th…
import 'dart:io';
import 'dart:typed_data';
import 'package:file_picker/file_picker.dart';
import 'firebase_storage_manager.dart';
class SmartImageUploader {
@unix14
unix14 / maps_extension.dart
Created October 9, 2024 12:04
Provides utility functions and extensions for Map objects. It includes methods to print map details, get changes between two maps in string and map formats, and revert changes for a specific key in a map
extension MapsExtension on Map {
void printAll() {
this.forEach((key, value) {
print('Key: $key Value: $value');
});
}
String printAllKeys() {
@unix14
unix14 / firebase_storage_manager.dart
Last active October 9, 2024 12:10
This is a singleton class that handles file uploads and downloads for both web and mobile using Firebase Storage. Depends on firebase_storage lib
import 'dart:io';
import 'package:firebase_storage/firebase_storage.dart' as fbStorage;
import 'package:flutter/foundation.dart';
class FirebaseStorageManager {
static final FirebaseStorageManager _instance = FirebaseStorageManager._();
factory FirebaseStorageManager() {
return _instance;