Skip to content

Instantly share code, notes, and snippets.

# Bash function which returns transparency hex value for color based on given opacity percentage.
# e.g. opacity 55 (opacity for 55%)
function opacity {
hex_array=(00 03 05 08 0A 0D 0F 12 14 17 1A 1C 1F 21 24 26 29 2B 2E 30 33 36 38 3B 3D 40 42 45 47 4A 4D 4F 52 54 57 59 5C 5E 61 63 66 69 6B 6E 70 73 75 78 7A 7D 80 82 85 87 8A 8C 8F 91 94 96 99 9C 9E A1 A3 A6 A8 AB AD B0 B3 B5 B8 BA BD BF C2 C4 C7 C9 CC CF D1 D4 D6 D9 DB DE E0 E3 E6 E8 EB ED F0 F2 F5 F7 FA FC FF)
echo "${hex_array[$1 + 1]}"
}
@sudam-chavan
sudam-chavan / print_access_token.py
Last active May 28, 2019 10:29
Print firebase access token for remote config scope
###
#
# install oauth2client before running
# pip3 install --upgrade oauth2client or pip install --upgrade oauth2client
#
###
from oauth2client.service_account import ServiceAccountCredentials
import sys
adb shell dumpsys package | grep -i "<package-name>" | grep Activity
# Steps to generate sample AngularJS application with yeoman and bootstrap
# After setup is done run "grunt server" to start the sample application.
# install yeoman, grunt-cli and bower
npm install -g yo grunt-cli bower
# install karma required for next step
sudo npm install -g generator-karma
# install angular generator
npm install -g generator-angular
# generate new sample AngularJS application