Skip to content

Instantly share code, notes, and snippets.

View omerb09's full-sized avatar

Ömer Bulut omerb09

  • ITT Teknoloji
  • Turkey, Gebze
View GitHub Profile
@demirdev
demirdev / pinch_to_scale_value.dart
Last active January 3, 2023 08:58
pinch to scale double values, for example change text size with fingers
import 'package:flutter/material.dart';
// learned from: https://copyprogramming.com/howto/flutter-gesturedetector-how-to-pinch-in-out-or-zoom-in-out-text-using-two-fingers
class PinchToScaleValue extends StatefulWidget {
final Widget child;
PinchToScaleValue(
{Key? key,
required this.child,
@semihkeskindev
semihkeskindev / tr_phone_regex_advanced.txt
Last active March 21, 2024 12:20
TR Turkey Turkish Phone Regex advanced
// 3. satırı baştan sona kopyalamanız gerekmektedir. Çalışır örneğini 5. satırdaki linkten görebilirsiniz.
/(^[0\s]?[\s]?)([(]?)([5])([0-9]{2})([)]?)([\s]?)([0-9]{3})([\s]?)([0-9]{2})([\s]?)([0-9]{2})$/g
// https://regexr.com/5005l
@zzpmaster
zzpmaster / formatBytes.dart
Last active April 21, 2025 17:26
convert bytes to kb mb in dart
static String formatBytes(int bytes, int decimals) {
if (bytes <= 0) return "0 B";
const suffixes = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
var i = (log(bytes) / log(1024)).floor();
return ((bytes / pow(1024, i)).toStringAsFixed(decimals)) +
' ' +
suffixes[i];
}
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active November 2, 2025 14:32
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S