Skip to content

Instantly share code, notes, and snippets.

View quangson91's full-sized avatar
🎯
Focusing

QuangSon quangson91

🎯
Focusing
  • Freedom
  • Earth
View GitHub Profile
# Installing Chrome
curl -L -O "https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg"
hdiutil mount -nobrowse googlechrome.dmg
cp -R "/Volumes/Google Chrome/Google Chrome.app" /Applications
hdiutil unmount "/Volumes/Google Chrome"
rm googlechrome.dmg
# Installing Firefox
curl -L -o Firefox.dmg "http://download.mozilla.org/?product=firefox-latest&os=osx&lang=en-US"
hdiutil mount -nobrowse Firefox.dmg
@quangson91
quangson91 / genymotionwithplay.txt
Last active August 29, 2015 14:25 — 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 5.1 (https://www.androidfilehost.com/?fid=96042739161892865 - 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)
Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip)
@quangson91
quangson91 / 1MarkerAnimation.java
Last active August 29, 2015 14:27 — forked from broady/1MarkerAnimation.java
Animating Markers
/* Copyright 2013 Google Inc.
Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0.html */
package com.example.latlnginterpolation;
import android.animation.ObjectAnimator;
import android.animation.TypeEvaluator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.os.Build;
@quangson91
quangson91 / Android Lollipop Widget Tinting Guide
Created October 7, 2015 06:02 — forked from seanKenkeremath/Android Lollipop Widget Tinting Guide
How base colors in Lollipop apply to different UI elements
Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21. To use the support version of these attributes, remove the android namespace. For instance, "android:colorControlNormal" becomes "colorControlNormal". These attributes will be propagated to their corresponding attributes within the android namespace for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix.
All Clickable Views:
-----------
* ripple effect (Lollipop only) -- "colorControlHighlight"
Status Bar:
------------
* background (Lollipop only) - "colorPrimaryDark"
@quangson91
quangson91 / jenikns_ci_on_osx.md
Created June 2, 2016 06:35 — forked from ostinelli/jenkins_ci_on_osx.md
Setup Jenkins CI on OSX.

Jenkins CI on OSX

Instructions on how to setup a secured Jenkins CI on a Mac.

Download & Install dependencies

All of these operations are done with your admin user.

Developer tools

Install the command line developer tools.

@quangson91
quangson91 / android_screencapture.sh
Created June 27, 2016 10:04
Android capture screenshot with adb
PREFIX="android_screenshot"
if [ $# -gt 0 ]
then
PREFIX=$1
fi
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > ~/Downloads/${PREFIX}_$(date +'%Y-%m-%d_%H-%M-%S').png
@quangson91
quangson91 / BingSpeechApi.java
Last active July 3, 2016 15:48
Demo bing speech api for ANDROID.
package com.vnzit.testbingspeechapi;
import com.google.gson.Gson;
import org.apache.commons.io.IOUtils;
import java.io.InputStream;
import java.util.concurrent.TimeUnit;
import okhttp3.FormBody;
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#FFEBEE</color>
<color name="md_red_100">#FFCDD2</color>
<color name="md_red_200">#EF9A9A</color>
@quangson91
quangson91 / AndroidRecord.sh
Created September 14, 2016 07:53 — forked from FriendlyTester/AndroidRecord.sh
BASH script to record Android display and download/delete the video
#Check if an argument was supplied
if [ -z "$1" ]
then
echo "No argument supplied, please provide video name"
else
# start recording
adb shell screenrecord --bit-rate 6000000 /sdcard/$1.mp4 &
# Get its PID
PID=$!
@quangson91
quangson91 / start_docker_socket.sh
Created October 4, 2016 01:05
API URL for docker-mac & intellij
socat TCP-LISTEN:2375,reuseaddr,fork,bind=localhost UNIX-CONNECT:/var/run/docker.sock &
echo "Usage: tcp://localhost:2375 for binding API URL"
echo "You can check this link for more detail: https://youtrack.jetbrains.com/issue/IDEA-153973"