Skip to content

Instantly share code, notes, and snippets.


Sebastiano Poggi rock3r

View GitHub Profile
rock3r /
Last active Apr 28, 2017
Move/rename *-{m|h|xh|xxh|xxxh}dpi.png" assets into proper folder structure, ready for copypasta
# License for any modification to the original (linked below):
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# Sebastiano Poggi wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return.
# ----------------------------------------------------------------------------
buckets=( mdpi hdpi xhdpi xxhdpi xxxhdpi )
eveliotc / android-select-device
Last active Feb 5, 2019
My (android) dev aliases and scripts
View android-select-device
#! /bin/bash
# from
# selects an android device
PROGNAME=$(basename $0)
for opt in "$@"
case "$opt" in
* Copyright (C) 2014 The Android Open Source Project
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
keyboardsurfer / flavor_names_build.gradle
Last active Mar 1, 2019
Version names for application variants
View flavor_names_build.gradle
android {
applicationVariants.all { variant ->
def flavor = variant.mergedFlavor
def name = flavor.getVersionName()
def versionName = name + '-' +'flavorName')
if (variant.buildType.isDebuggable()) {
versionName += '-debug';
flavor.versionName = versionName;
Takhion /
Last active Jul 10, 2020
Collection of methods to achieve better circular arc drawing, as Canvas.drawArc() is unreliable. See the related article:
* Copyright (c) 2014 BioWink GmbH.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
JakeWharton /
Created May 21, 2013
A `HttpStack` implementation for Volley that uses OkHttp as its transport.
import com.squareup.okhttp.OkHttpClient;
* An {@link HttpStack} implementation which
* uses OkHttp as its transport.
jdamcd / gist:4224231
Created Dec 6, 2012
Thumbnail scaling for Android notfications
View gist:4224231
public class NotificationThumbnailHelper {
private float targetWidth;
private float targetHeight;
public NotificationThumbnailHelper(Context context) {
targetWidth = getTargetWidth(context);
targetHeight = getTargetHeight(context);
You can’t perform that action at this time.