Skip to content

Instantly share code, notes, and snippets.

View Alexander-Prime's full-sized avatar

Alexander Peters Alexander-Prime

  • Phoenix, AZ
View GitHub Profile
@Alexander-Prime
Alexander-Prime / strim
Created September 25, 2016 21:22
A nice command-line utility for Linux livestreamers
#!/bin/bash
##--------------------------------------------------------------------------------
read -rd '' USAGE <<"BOUND"
Usage: strim <command>
Commands:
repo Show the current directory's Github remote on this user's overlay
tag Add a tag for this commit with the name "stream-<date>", where <date> is the current date as [yyyymmdd]
BOUND
//==============================================================================
public class RatioImageView extends ImageView {
//--------------------------------------------------------------------------
public static final int SCALE_AXIS_VERTICAL = 0, SCALE_AXIS_HORIZONTAL = 1;
private int scaleAxis = SCALE_AXIS_VERTICAL;
private float ratio = 16f / 9f;
//--------------------------------------------------------------------------
<!--attrs.xml-->
<resources>
<attr name="primaryColor" format="color" />
</resources>
<!--themes.xml-->
<!-- Other themes may inherit from AppTheme and define their own primaryColor -->
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">