Skip to content

Instantly share code, notes, and snippets.

View agent3bood's full-sized avatar
🚀

Abdullah Alsigar agent3bood

🚀
View GitHub Profile
@agent3bood
agent3bood / main.dart
Last active November 8, 2023 15:56
merge maps bug
void main() {
final map1 = <String, dynamic>{
'refs': {'k1': 1, 'k2': 's'}
};
final map2 = {
'refs': {'k3': null}
};
map1.merge(map2);
}
@agent3bood
agent3bood / main.dart
Created May 9, 2022 17:27
Data symmetric equality
void main() {
// DataBool
print(DataBool(true) == true); // true
print(true == DataBool(true)); // false
// DataString
print(DataString("a") == "a"); // true
print("a" == DataString("a")); // false
}
abstract class Data<T> {
@agent3bood
agent3bood / main.dart
Created July 8, 2020 10:36
example logger
import 'dart:convert';
import 'dart:typed_data';
void main() {
Map<String, dynamic> outMap = {
'wheelSpeed': 3,
'tempFet': 4.4,
'tempMotor': 5.5,
'motorCurr': 6.6,
'inputCurr': 7,
@agent3bood
agent3bood / adb_wifi.md
Last active July 31, 2020 00:07
abd over WiFi

First make sure the device is connected by USB

adb tcpip 5555
adb connect <phone IP>:5555
adb devices