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
@omerb09
omerb09 / get_fcm_token.sh
Last active June 3, 2025 15:03
Generate firebase cloud messaging access token
#!/bin/bash
# Firebase Access Token Generator Script
# Usage: ./get_fcm_token.sh path/to/service-account.json
set -e
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
@omerb09
omerb09 / Apple_mobile_device_types.txt
Created September 14, 2022 10:07 — forked from adamawolf/Apple_mobile_device_types.txt
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
@omerb09
omerb09 / formatBytes.dart
Created August 20, 2022 10:24 — forked from zzpmaster/formatBytes.dart
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];
}