Skip to content

Instantly share code, notes, and snippets.

View trevjonez's full-sized avatar

Trevor Jones trevjonez

  • Aetna @ CVS Health
  • Texas
View GitHub Profile
@ghale
ghale / throttle.gradle
Last active June 20, 2022 13:30
Captures OS X CPU throttling as a custom value/tag
import org.gradle.api.services.BuildService
import org.gradle.api.services.BuildServiceParameters
import java.nio.charset.Charset
import java.util.concurrent.Executors
import java.util.concurrent.ScheduledExecutorService
import java.util.concurrent.TimeUnit
/**
* This Gradle script captures the thermal stats as reported by the OS 'pmset' command,
anonymous
anonymous / BetterScrollToAction.java
Created October 19, 2017 13:29
Espresso Matcher supporting NestedScrollView
package com.capitalone.mobile.wallet.androidtest;
import android.graphics.Rect;
import android.support.test.espresso.PerformException;
import android.support.test.espresso.UiController;
import android.support.test.espresso.ViewAction;
import android.support.test.espresso.matcher.ViewMatchers.Visibility;
import android.support.test.espresso.util.HumanReadables;
import android.support.v4.widget.NestedScrollView;
import android.util.Log;
@kennwhite
kennwhite / 1944_OSS_Simple_Sabotage_Field_Manual.md
Last active November 9, 2024 03:51
1944 OSS Simple Sabotage Field Manual
@mannodermaus
mannodermaus / CompatTextView.java
Last active August 30, 2018 09:59
Custom TextView implementation to allow VectorDrawableCompat to work with compound Drawables
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewCompat;
import android.support.v7.widget.AppCompatDrawableManager;
import android.support.v7.widget.AppCompatTextView;
import android.util.AttributeSet;
@bmhatfield
bmhatfield / .profile
Last active November 14, 2024 12:11
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@gtomek
gtomek / IoUtilsWithOkIo.java
Created February 10, 2016 10:55
Read files with Okio
/**
* Utils for I/O operations.
* <p/>
* Created by Tomek on 09/06/15.
*/
public class IoUtils {
/**
* Reads file and returns a String.
*
@staltz
staltz / introrx.md
Last active November 17, 2024 01:08
The introduction to Reactive Programming you've been missing
@P7h
P7h / IntelliJ_IDEA__Perf_Tuning.txt
Last active October 21, 2024 01:10
Performance tuning parameters for IntelliJ IDEA. Add these params in idea64.exe.vmoptions or idea.exe.vmoptions file in IntelliJ IDEA. If you are using JDK 8.x, please knock off PermSize and MaxPermSize parameters from the tuning configuration.
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1