Skip to content

Instantly share code, notes, and snippets.

View liutingdu's full-sized avatar
💃
Typing...

Liuting Du liutingdu

💃
Typing...
  • Intercom
  • Dublin
View GitHub Profile
@liutingdu
liutingdu / label_divider.xml
Created August 14, 2015 09:04
Scanning Result UI Backup
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="1dp"
android:layout_height="fill_parent"
android:orientation="vertical">
<View
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@android:color/white"/>
<View

###Generate certificate fingerprints for Google API key In home directory, run
keytool -list -v -keystore ~/.android/debug.keystore
Default password is android
Remember to add both release & debug keystore fingerprint to the developer console.

Here's a correct table of percentages to hex values. E.g. for 50% white you'd use #80FFFFFF. 100% — FF 95% — F2 90% — E6 85% — D9 80% — CC 75% — BF 70% — B3 65% — A6 60% — 99 55% — 8C

@liutingdu
liutingdu / git_commands.md
Last active August 29, 2015 14:10
Useful git commands

##Branch Management show all branches git branch -v git branch -a
delete branch git branch -d
clone a single branch git clone -b mybranch --single-branch git://sub.domain.com/repo.git

##Discard Changes / Commits Discard all local changes and commitsgit reset --hard origin/master

##Manage commit histories Remove all commit hstories for file contains sensitive data:

@liutingdu
liutingdu / adb-commands.md
Last active January 15, 2016 16:25
ADB commands

Grabs a screenshot from the Android device and stores directly on OS X
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png