Skip to content

Instantly share code, notes, and snippets.

Scott Alexander-Bown scottyab

Block or report user

Report or block scottyab

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@scottyab
scottyab / Coloring.java
Created Oct 29, 2018 — forked from milosmns/Coloring.java
Android: Coloring (Helper Class)
View Coloring.java
package me.angrybyte.coloringdemo;
import static android.graphics.PorterDuff.Mode.SRC_ATOP;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Bitmap;
View convertSvgToPng.sh
#!/usr/bin/env bash
# exit if fails
set -o errexit
set -o pipefail
# reads the first arg as the file - expected list of file names without extension
filename="${1:-}"
# loops through each line
while read -r line
@scottyab
scottyab / add-copyright.py
Last active May 24, 2018 — forked from rodrigosetti/add-copyright.py
Adds Copyright Notice to a bunch of Java and Kotlin files
View add-copyright.py
@scottyab
scottyab / Contract Killer 3.md
Created Nov 24, 2017 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer 3.md

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

View PageLinks.java
View WeeklyDayCalorieBarView.java
package com.enquos.nutrition.dashboard;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.view.View;
View QLog.java
package com.bizzby.utils;
import android.util.Log;
import java.io.PrintWriter;
import java.io.StringWriter;
public class QLog
{
@scottyab
scottyab / gist:ff0bf65bd73f1572fa49
Created Jan 4, 2016
Example of crittercism api upload for proguard-mapping.txt
View gist:ff0bf65bd73f1572fa49
curl “https://app.crittercism.com/api_beta/proguard/<app_id>" -F proguard=@”<path/to/proguard-mapping.txt>” -F app_version=”app-version-name” -F key=<key>
View gist:b4b9db988568b5e93c05
Verifying that +scottyab is my openname (Bitcoin username). https://onename.io/scottyab
@scottyab
scottyab / Installer
Created Sep 17, 2014
Tamper checks
View Installer
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
public class InstallerCheck{
private static final String PLAY_STORE_APP_ID = "com.google.android";
public static boolean verifyInstaller(final Context context) {
You can’t perform that action at this time.