Skip to content

Instantly share code, notes, and snippets.

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

Jimmy minhdangoz

🏠
Working from home
View GitHub Profile
@minhdangoz
minhdangoz / AdbCommands
Created July 8, 2024 18:25 — forked from ernestkamara/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
Some informations about partitions from Android devices.
@minhdangoz
minhdangoz / jwtRS256.sh
Created May 23, 2024 07:42 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
MTK platform partition meaning
#Pre-loader
Pre-loader image
Handles all the download and secure boot procedure
#DSP_BL
DSP Boot Loader
#MBR、EBR1、EBR2
Ext4 file system partition index table
@minhdangoz
minhdangoz / rounded_button.dart
Created April 16, 2024 04:40
Create Flutter rounded button widget
import 'package:flutter/material.dart';
class RoundedButton extends StatelessWidget {
const RoundedButton({
super.key,
required this.text,
required this.press,
this.textColor = Colors.white,
this.gradient,
this.color,
@minhdangoz
minhdangoz / text_gradient.dart
Created April 16, 2024 04:37
Create gradient text effect for Flutter Text widget
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
class GradientText extends StatelessWidget {
const GradientText(
this.text, {
super.key,
required this.gradient,
this.style = const TextStyle(),
@minhdangoz
minhdangoz / nginx_macos.md
Created November 13, 2023 17:31 — forked from osamaqarem/nginx_macos.md
Nginx on MacOS

Install nginx (Homebrew)

brew install nginx

Configuration file for nginx will be at /usr/local/etc/nginx/nginx.conf

Web apps can be stored at /usr/local/var/www

Commands

Start:

@minhdangoz
minhdangoz / authorization_interceptor.dart
Created December 16, 2022 17:17 — forked from TimurMukhortov/authorization_interceptor.dart
Dio authorization Interceptor with QueuedInterceptorsWrapper
class AuthorizationInterceptor extends QueuedInterceptorsWrapper {
final TokenRepository _tokenRepository;
final AuthorizationRepository _authorizationRepository;
final RefreshTokenRepository _refreshTokenRepository;
AuthorizationInterceptor({
required TokenRepository tokenRepository,
required AuthorizationRepository authorizationRepository,
required RefreshTokenRepository refreshTokenRepository,
}) : _tokenRepository = tokenRepository,
@minhdangoz
minhdangoz / Readme.md
Created May 25, 2022 17:28 — forked from tenzap/Readme.md
Install OpenGApps In Android Emulator (up to API31 / android 12 / S)

Introduction

This works to install OpenGApps into the Android Emulator

Features:

  • uses opengapps installer script (that we patch slightly)
  • linux only because we mount the ext2/4 disk images to modify them. Could be adapted for macos if you use hdiutil instead of kpartx and have installed tools to mount ext2/4 filesystems on macos
  • root permissions mandatory to mount disk images and enter chroot
  • removes verity/verified-boot from the virtual device (so that the AVD can boot, otherwise it would not boot because we didn't update the dm_params)
@minhdangoz
minhdangoz / ConcurrencyHelpers.kt
Created May 4, 2022 01:52 — forked from objcode/ConcurrencyHelpers.kt
Helpers to control concurrency for one shot requests using Kotlin coroutines.
/* Copyright 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,