Skip to content

Instantly share code, notes, and snippets.

View jaredrummler's full-sized avatar

Jared Rummler jaredrummler

View GitHub Profile
@jaredrummler
jaredrummler / Skill.java
Last active December 16, 2021 06:21
Android easing functions. An animation collection to help make animation easier.
/*
* Copyright (C) 2015 Jared Rummler <jared.rummler@gmail.com>
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright (C) 2015 Jared Rummler <jared.rummler@gmail.com
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@jaredrummler
jaredrummler / HtmlBuilder.java
Created November 21, 2015 23:25
Helper to build valid HTML for an Android TextView.
/*
* Copyright (C) 2015. Jared Rummler <me@jaredrummler.com>
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@jaredrummler
jaredrummler / multidex.sh
Created December 2, 2015 06:55
Find out which installed apps use multi-dex.
#!/system/bin/sh
###############################################################################
# multidex.sh
#
# Find out which installed apps use multi-dex.
#
for line in $(pm list packages -f)
do
apk=$(echo $line | busybox cut -d: -f2 | busybox cut -d= -f1)
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
@jaredrummler
jaredrummler / RemovableStorageFinder.java
Created January 9, 2016 00:42
Y U NO PROVIDE API TO GET REMOVABLE SD CARD?
/*
* Copyright (C) 2016 Jared Rummler <jared.rummler@gmail.com>
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright (C) 2015. Jared Rummler <jared.rummler@gmail.com>
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@jaredrummler
jaredrummler / FontPreview.java
Created March 17, 2016 16:28
Create a font preview
import java.awt.Color;
import java.awt.Font;
import java.awt.FontFormatException;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.font.FontRenderContext;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.io.BufferedInputStream;
@jaredrummler
jaredrummler / voices.sh
Last active April 19, 2016 19:11
Test out all english speaking voices on OS X
#!/bin/bash
OIFS=$IFS
IFS="
"
for line in $(say -v ?)
do
voice=$(echo $line | awk '{print $1}')
locale=$(echo $line | awk '{print $2}')
for f
do
# Change this value to increase maximum size
GIF_MAX_SIZE=480
dir="$(dirname "$f")"
name="$(basename "$f")"
cd "$dir"