Skip to content

Instantly share code, notes, and snippets.

View Akhu's full-sized avatar
🏠
Working from home

Anthony Da Cruz Akhu

🏠
Working from home
View GitHub Profile
@Akhu
Akhu / readme.md
Created May 19, 2024 18:24
Activate CarPlay / Android Auto for Abarth 595 2016 via MultiEcuScan (Proxy Settings)

To add Carplay and Android Auto Feature :

If you have this Hexa setup (until 157)

33 32 31 35 30 30 32 30 31 32 39 4F 55 54 50 55 54 44 4A 49 54 20 16 07 13 4F 84 00 05 10 00 00 00 09 00 00 04 10 00 00 00 81 42 75 06 FE 20 1C C0 00 00 00 16 00 01 00 95 06 01 01 00 40 00 00 20 75 41 0A 0C 0D 01 80 2E 24 00 00 00 00 31 02 58 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 00 94 08 52 00 04 93 02 00 20 80 00 00 44 00 D5 00 0F 00 00 00 80 05 00 E0 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 00 00 00 00 00

Then you should add 00 until 193 bytes

33 32 31 35 30 30 32 30 31 32 39 4F 55 54 50 55 54 44 4A 49 54 20 16 07 13 4F 84 00 05 10 00 00 00 09 00 00 04 10 00 00 00 81 42 75 06 FE 20 1C C0 00 00 00 16 00 01 00 95 06 01 01 00 40 00 00 20 75 41 0A 0C 0D 01 80 2E 24 00 00 00 00 31 02 58 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 00 94 08 52 00 04 93 02 00 20 80 00 00 44 00 D5 00 0F 00 00 00 80 05 00 E0 02 00 00 00 00 00 00 
private val DarkColorScheme = darkColorScheme(
surface = Blue,
onSurface = Navy,
primary = Navy,
onPrimary = Chartreuse
)
private val LightColorScheme = lightColorScheme(
primary = LightBlue,
onPrimary = Navy,
@Akhu
Akhu / 📝 Work Good practices - Bonnes pratiques 🇫🇷.md
Last active February 16, 2024 15:00
La sagesse des générations de développeurs qui vous ont précédés :p
@Akhu
Akhu / AnimationSampleDragNDropSwiftUI.swift
Created January 23, 2024 08:13
Just to show off some cool animations with SwiftUI
import SwiftUI
struct DragNDropDotsView: View {
@State private var gridColumns = Array(repeating: GridItem(.flexible()), count: 15)
@State private var colors = [Color.pink, Color.mint, Color.orange, Color.teal, Color.yellow, Color.cyan, Color.purple, Color.blue]
@State private var offset = CGSize.zero
@State private var scaleFactor : CGFloat = 1
@State private var isAnimating : Bool = true

List

let array = Array(0..<20).shuffled()

var sum = array.reduce(0, +)

var avg = sum / array.count
import 'dart:ui';
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
static const String _title = 'Flutter - Basics';
import 'dart:ui';
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
static const String _title = 'Flutter - Basics';
import 'dart:ui';
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
static const String _title = 'Flutter - Basics';
@Akhu
Akhu / NFC Entitlements iOS.xml
Created March 25, 2023 11:02
To put in info.plist in order to make NFC works
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>nfc</string>
</array>
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>A0000002310100000000000000000000</string>
<string>A0000002310200000000000000000000</string>
<string>A0000002480300000000000000000000</string>
<string>A00000006510</string>
@Akhu
Akhu / TranslateSVGPathToSwiftUIPath.js
Created August 6, 2022 17:10
Quick tool to convert SVG Path to SwiftUI Path, I did this quickly, it is missing many SVG path identifier but you will figure out how to make it work yourself it's pretty easy.
/**
* Creating SwiftUI Path from SVG path data
*/
const regex = /([MmLlSsQqLlHhVvCcSsQqTtAaZz]){1} ((-?[0-9]*\.?\d+) ){2,6}|Z/mg;
//Replace content of svgPath by your SVG Path data
const svgPath = `M 13.0286 28 C 22.123 12 26.6701 4.3722 32.6067 1.7291 C 37.7849 -0.5764 43.698 -0.5764 48.8762 1.7291 C 54.8128 4.3722 59.3599 12.2481 68.4543 28 C 77.5486 43.7519 82.0958 51.6278 81.4165 58.0906 C 80.824 63.7277 77.8674 68.8487 73.2818 72.1803 C 68.0245 76 58.9301 76 40.7414 76 C 22.5528 76 13.4584 76 8.2011 72.1803 C 3.6155 68.8487 0.6589 63.7277 0.0664 58.0906 C -0.6129 51.6278 3.9343 43.7519 13.0286 28 Z`;
let regexDetectionResult;