Skip to content

Instantly share code, notes, and snippets.

View MadMaxMcKinney's full-sized avatar

Max McKinney MadMaxMcKinney

View GitHub Profile
@MadMaxMcKinney
MadMaxMcKinney / materialcolors.xml
Created June 12, 2015 15:15
Material Design Colors (Android XML)
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="material_red50">#ffffebee</color>
<color name="material_red100">#ffffcdd2</color>
<color name="material_red200">#ffef9a9a</color>
<color name="material_red300">#ffe57373</color>
<color name="material_red400">#ffef5350</color>
<color name="material_red500">#fff44336</color>
<color name="material_red600">#ffe53935</color>
<color name="material_red700">#ffd32f2f</color>
@MadMaxMcKinney
MadMaxMcKinney / bohemianRhapsody
Created November 2, 2013 03:52
Describe song via code.
try
{
Assert(Life.Real);
Assert(Life.Fantasy);
}
catch(LandSlideException ex)
{
#region Reality
while(true)
{
@MadMaxMcKinney
MadMaxMcKinney / DiceRoll.java
Created July 10, 2013 14:17
###Daily Programmer - July 10th 2013 User input in the form of 'ndm' where n is the number of dice, and m is the number of faces.
import java.util.Scanner;
public class DiceRoll {
public static void main(String[] args) {
// Get the java console scanner. Allows the user to type into the console.
Scanner s = new Scanner(System.in);
// Pull the contents from what the user said. Split the array at the "d".
// The input will look like ex: 4d10
// Returns 4, 10 to the String array 'in'.
@MadMaxMcKinney
MadMaxMcKinney / Android_TabListner.java
Created December 31, 2012 20:41
Android 3.0+ TabListener.
private class TabListener<T extends Fragment> implements
ActionBar.TabListener {
private Fragment mFragment;
private final Activity mActivity;
private final String mTag;
private final Class<T> mClass;
// Constructor - set the variables up from when you call the method somewhere else
public TabListener(Activity activity, String tag, Class<T> clz) {
mActivity = activity;