Skip to content

Instantly share code, notes, and snippets.

View phamducminh's full-sized avatar

Minh Pham phamducminh

View GitHub Profile

Meta Character

  • ? : Zero or One
  • + : One or More
  • * : Zero or More
  • \w : alpha numeric values
  • \d : digits or numbers
  • \s : space
  • [A-Z] : all capital letters
  • [a-z] : all lowercase letters
@phamducminh
phamducminh / change-accessibility-settings-with-adb.md
Created November 20, 2024 17:38 — forked from mrk-han/change-accessibility-settings-with-adb.md
Enable and Disable Android Accessibility Settings from the Command Line using ADB (Font scale, talkback, color blind)

Using ADB to control Accessbility settings for easier testing with Android Emulators + Real Devices

It's a lot easier to test accessibility on the fly using ADB. This gist attempts to make the days of navigating through the Android device settings UI to change Accessibility settings obsolete.

These ADB commands will hopefully encourage Android developers to test and use their apps with common Accessiblility settings enabled.

Credit to James Nitsch for inspiring this, and for figuring out the put commands to enable these settings.

Font Scale (Font Size -- Testing Dynamic Text)

@phamducminh
phamducminh / remove_accents.py
Created April 27, 2023 15:02 — forked from J2TEAM/remove_accents.py
Remove Vietnamese Accents - Xoá dấu tiếng việt in Python
s1 = u'ÀÁÂÃÈÉÊÌÍÒÓÔÕÙÚÝàáâãèéêìíòóôõùúýĂăĐđĨĩŨũƠơƯưẠạẢảẤấẦầẨẩẪẫẬậẮắẰằẲẳẴẵẶặẸẹẺẻẼẽẾếỀềỂểỄễỆệỈỉỊịỌọỎỏỐốỒồỔổỖỗỘộỚớỜờỞởỠỡỢợỤụỦủỨứỪừỬửỮữỰựỲỳỴỵỶỷỸỹ'
s0 = u'AAAAEEEIIOOOOUUYaaaaeeeiioooouuyAaDdIiUuOoUuAaAaAaAaAaAaAaAaAaAaAaAaEeEeEeEeEeEeEeEeIiIiOoOoOoOoOoOoOoOoOoOoOoOoUuUuUuUuUuUuUuYyYyYyYy'
def remove_accents(input_str):
s = ''
print input_str.encode('utf-8')
for c in input_str:
if c in s1:
s += s0[s1.index(c)]
else:
s += c
@phamducminh
phamducminh / git-best-practices.md
Created May 18, 2022 16:14
Git Best Practices
@phamducminh
phamducminh / merge-request-guide.md
Last active May 18, 2022 16:13
Merge Request Guide

Merge Request Guideline

In order to improve code quality we have to follow merge request rule.

By Minh Pham, 2020

Dùng merge request cho các branch: develop, release_*

Để tăng chất lượng code sau khi tách business team thì codebase của android sẽ app dụng rule là phải tạo request merge và được accept bởi reviewer với yêu cầu theo bên dưới:

@phamducminh
phamducminh / git-workflow.md
Last active June 20, 2022 05:21
Git Workflow
@phamducminh
phamducminh / git-tutorial.md
Last active August 27, 2022 12:32
Git Tutorial

Git Tutorial

The purpose of this document is to guide the user on how to work with the Android git repository and git commands in general. This document is not meant to be a full git teaching tool, but more of a getting started guide.

By Minh Pham, 2020

Content

Yes Yes content
No No content