Skip to content

Instantly share code, notes, and snippets.

View dallasgutauckis's full-sized avatar
🚀
Leading Thoughts 🚀

Dallas Gutauckis dallasgutauckis

🚀
Leading Thoughts 🚀
View GitHub Profile
@dallasgutauckis
dallasgutauckis / listDevices.sh
Created April 9, 2014 19:42
Lists connected Android devices (via adb) and the device's corresponding model and OS version - See http://dallasgutauckis.com/2014/04/09/listing-connected-android-devices-with-os-version-and-model/
#!/bin/bash
if [[ ! $PATH_TO_ADB ]]; then
PATH_TO_ADB=`which adb`
fi
if [[ ! $PATH_TO_ADB ]]; then
if [[ ! $ANDROID_HOME ]]; then
echo "Failed to determine path to adb; consider setting ANDROID_HOME to your SDK directory or PATH_TO_ADB to the path to ADB"
exit 1
fi

Keybase proof

I hereby claim:

  • I am dallasgutauckis on github.
  • I am dallas (https://keybase.io/dallas) on keybase.
  • I have a public key whose fingerprint is FEB6 5FFB 4A72 176D C141 47EE BA08 9A0A 97A5 1EE1

To claim this, I am signing this object:

@dallasgutauckis
dallasgutauckis / kasra
Created September 23, 2014 03:34
For kasra only…
-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP v1.0.5
Comment: https://keybase.io/crypto
wcFMAzhAhalajY0eARAAgnJpJWXy+vZFeUGGtoJ0xlGsHl1lFoj0i0xMIjsPmsIs
Oe5tSQmXZI4UKqnBg5RO5MDbYDeQMiCGchKoV8yKoffohE8MAuFHcQvhAvYh5mtR
ER87162T5iQUanjIy/+WN5kYxEG31jcjZNQ9IycTsQGgNsrPNd3yM16q+SaOVb5I
k5DWQa808VxCLOQkJbGNnrYWSFOisFNuzXTBb5wxAlrmh+0BR2ZPz6oaeRcBZhNc
dT4Zku/yuhaGt04qqj1AuPymHuiSP/giaqaCP98ZyJN17HtYhNKT5N/exC/stQ2m
OxFgwlzaJJW14mbHweg+YlGKkSh4aNl+dzkMfTqsVZpdsj+dR/1kPZsLUxujAmTX
@dallasgutauckis
dallasgutauckis / gist:9a1e0c8c5b478ee74f53
Created October 9, 2014 05:43
optimum ISP packet loss
~ $ ping -s 1000 google.com
PING google.com (173.194.123.4): 1000 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
1008 bytes from 173.194.123.4: icmp_seq=2 ttl=55 time=13.186 ms
1008 bytes from 173.194.123.4: icmp_seq=3 ttl=55 time=13.760 ms
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
1008 bytes from 173.194.123.4: icmp_seq=6 ttl=55 time=12.470 ms
Request timeout for icmp_seq 7
package com.trello.core.rx;
import rx.Observable;
import rx.Subscriber;
/**
* Passes control to another Observable if the source observable does not emit any items.
*
* Handy if you've a CacheObservable that does a cheap lookup and a DoHardWorkObservable that does the
* hard work and you want to only do the hard work if CacheObservable is empty.
@dallasgutauckis
dallasgutauckis / gist:d3f6d7052ab57528885e
Last active August 29, 2015 14:14
Schedulers for automated testing
// So, we needed to be able to change all of our scheduler usage to run in the immediate thread, but couldn't change out the Scheduler implementations. Instead, we interfaced out a new way of getting our schedulers:
public interface RxSchedulerFactory {
public rx.Scheduler io();
public rx.Scheduler computation();
public rx.Scheduler main();
public rx.Scheduler newThread();
Process: studio [3956]
Path: /Applications/Android Studio 1.1.app/Contents/MacOS/studio
Identifier: com.google.android.studio
Version: 1.1.0 (AI-135.1740770)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: studio [3956]
User ID: 501
Date/Time: 2015-03-19 14:53:29.944 -0400
@dallasgutauckis
dallasgutauckis / crashlytics_dash.php
Created June 1, 2015 18:18
A simple PHP class and script for building geckoboard-compatible JSON output about the top build crash rates from Crashlytics
<?php
class Crashlytics {
private $orgId;
private $appId;
private $devToken;
private $fabricSession;
public function __construct( $orgId, $appId, $devToken, $fabricSession ) {
$this->orgId = $orgId;
$this->appId = $appId;

Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21. To use the support version of these attributes, remove the android namespace.

For instance, android:colorControlNormal becomes colorControlNormal.

These attributes will be propagated to their corresponding attributes within the android namespace for devices running Lollipop. Any exceptions to this will be noted by including the android: prefix.

All Clickable Views: