Skip to content

Instantly share code, notes, and snippets.

View shallowlong's full-sized avatar

xiyunlong shallowlong

  • PRC
  • 11:02 (UTC +08:00)
View GitHub Profile
@shallowlong
shallowlong / chn_fonts.reg
Created June 25, 2022 17:00 — forked from swordfeng/chn_fonts.reg
Chinese font settings in wine
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
"Arial"="wqy-microhei.ttc"
"Arial Black"="wqy-microhei.ttc"
"Arial CE,238"="wqy-microhei.ttc"
"Arial CYR,204"="wqy-microhei.ttc"
"Arial Greek,161"="wqy-microhei.ttc"
"Arial TUR,162"="wqy-microhei.ttc"
"Courier New"="wqy-microhei.ttc"
ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//'
@shallowlong
shallowlong / genymotionwithplay.txt
Created July 25, 2016 06:35 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
@shallowlong
shallowlong / [Android] Enable DEBUG mode in HUAWEI phone
Created January 13, 2014 16:42
How to enable the "DEBUG" level log in a HUAWEI android phone (not checking the different kinds of HUAWEI phones, but should be okay to use). The problem here is that in the LogCat, the debug level logs cannot be viewed when using a HUAWEI android phone. There are several steps to activate the DEBUG level log inside a HUAWEI phone. This knowledg…
dial *#*#2846579#*#*
select 'ProjectMenu'
select 'Background Setting'
select 'Log Setting'
select 'Log Switch'
enable 'LOG on'
Select 'Log level setting'
enable 'DEBUG'
Press the 'Back' key
select 'Dump and Log'
@shallowlong
shallowlong / [Android] Handler (Advanced)
Last active January 2, 2016 23:58
The advanced handler to set the runnable task and set time postpond
// the advanced handler will allow to postpone for a given time.
// instead of using the java.lang.Thread class, the new class is java.lang.Runnable class
android.os.Handler.Handler
android.os.Message
java.lang.Runnable
Handler msgHandler = new Handler() {
@Override
@shallowlong
shallowlong / [Android] Strict Mode
Last active January 2, 2016 15:09
Code is shared over the internet. Save the code snippet for activating the strict mode in Android
// Strict Mode is very helpful to the developers to track any of the policy we set, like the disk operation or the database operation, this will help the developer to track the app, the result is to popup an window showing the StritMode message when the app avoid the policies
// if we want to enable some policy in some place
// we can temporarily enable some policy from the existing
// StrictMode
// like the following way:
// StrictMode.ThreadPolicy old = StrictMode.getThreadPolicy();
// // save the current one policy
// StrictMode.setThreadPolicy(new
@shallowlong
shallowlong / [Android] Handler (Simple)
Last active January 2, 2016 15:08
Here gives the very basic handler idea for communicating between the main thread and others
// Handler is used to send/receive and operate for the messages
// Usually a new thread will be created to do something logic instead in the current main thread
// Handler will act as the postman between the main thread and separated thread
android.os.Handler.Handler
android.os.Message
java.lang.Thread