Skip to content

Instantly share code, notes, and snippets.

@amulyakhare
amulyakhare / pie_chart_data
Created October 11, 2016 09:11
Sample Data
{
labels: ["Red","Green","Yellow","Grey","Blue"],
datasets: [
{
data: [11,16,7,3,14],
backgroundColor: [
"#FF6384",
"#4BC0C0",
"#FFCE56",
"#E7E9ED",
@amulyakhare
amulyakhare / icon-gen.sh
Created August 27, 2015 10:53
Bash script to update the application icon of our internal release builds to include a visual marker and version number on the icon for convenience of the testers.
#!/bin/bash
# $> bash icon-gen.sh <version label> <project dir> <script sub-dir>
#
#
# process_icon version_num res_sub_dir current_work_dir target_dir
process_icon(){
image_width=`identify -format %[fx:w] $3/app/src/main/res/drawable-$2/com_garena_shopee_logo_shopee_launcher.png` && let "image_width-=4"
image_height=`identify -format %[fx:h] $3/app/src/main/res/drawable-$2/com_garena_shopee_logo_shopee_launcher.png` && let "image_height-=4"
convert $3$4/marker.png -background '#0000' -fill white -gravity south -size 137x16 caption:$1 -composite -resize $image_widthx$image_height $3$4/intermediate.png
convert -composite -gravity center $3/app/src/main/res/drawable-$2/com_garena_shopee_logo_shopee_launcher.png $3$4/intermediate.png $3$4/com_garena_shopee_logo_shopee_launcher.png
@amulyakhare
amulyakhare / androiddev_compact
Created May 16, 2015 04:10
/r/androiddev Compact
#header-bottom-left {
top: 20px;
}
.content {
margin-top: 80px;
}
.side .md h6 a:last-of-type {
position: absolute;
@amulyakhare
amulyakhare / 0_reuse_code.js
Created July 25, 2014 04:46
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
{
"start":"18/03/2013 00:25:16",
"end":"18/03/2013 00:25:47",
"totalStrokes":34,
"fixStrokes":1,
"predictionStrokes":3,
"changeInputStrokes":0,
"inputLength":42,
"typosFixed":2,
"strokesSaved":11,