Skip to content

Instantly share code, notes, and snippets.

View mwinters-stuff's full-sized avatar

Mathew Winters mwinters-stuff

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mwinters-stuff
mwinters-stuff / compiler_alternatives.sh
Created May 16, 2017 22:20
Small script for creating missing alternatives for gcc/g++ and clang/clang++ in ubuntu.
#!/bin/bash
ALTS="gcc g++ clang clang++"
for VAR in $ALTS
do
echo $VAR
update-alternatives --remove-all $VAR
FOUND=`find /usr/bin -name $VAR-* -print | grep $VAR-[0-9] | sort`
C=10
@mwinters-stuff
mwinters-stuff / DeviceUuidFactory.java
Created October 22, 2015 19:28
Android Device UUID Factory.
package apackage;
import android.content.Context;
import android.content.SharedPreferences;
import android.provider.Settings.Secure;
import android.telephony.TelephonyManager;
import java.io.UnsupportedEncodingException;
import java.util.UUID;
@mwinters-stuff
mwinters-stuff / gulpfile.js
Created June 23, 2015 07:26
Polymer Starter Kit gulp.js Modified to leave only required files in the dist directory.
/*
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
'use strict';
@mwinters-stuff
mwinters-stuff / CustomMatchers.java
Last active February 3, 2017 19:46
Espresso for Android - Finding Listviews by Tag for onData
package nz.org.winters.android.widgetscommon.tests;
import android.support.test.espresso.DataInteraction;
import android.support.test.espresso.matcher.BoundedMatcher;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import nz.org.winters.android.widgetscommon.settings.FABPreferenceFragment;
import nz.org.winters.android.widgetscommon.settings.SettingGroupListFragment;