Skip to content

Instantly share code, notes, and snippets.

View rabross's full-sized avatar
☀️

Rab Ross rabross

☀️
View GitHub Profile
@Nilzor
Nilzor / bash.rc
Last active August 11, 2017 06:20
bash.rc for Android screenshot and recording
And-Screenshot() {
# Todo: Add demo mode: https://android.googlesource.com/platform/frameworks/base/+/master/packages/SystemUI/docs/demo_mode.md
if [ "$1" = "" ] ; then echo "Specify output file name"
else
adb shell screencap -p /sdcard/screen.png
adb pull /sdcard/screen.png
adb shell rm /sdcard/screen.png
PCT=$2
if [ "$PCT" = "" ]; then PCT=33%; fi
convert screen.png -resize $PCT $1
anonymous
anonymous / script.py
Created November 3, 2015 11:47
import cv2
import numpy as np
def get_frame_averages(video_path):
vc = cv2.VideoCapture(video)
if vc.isOpened():
rval, frame = vc.read()
else:
@tir38
tir38 / IgnoreCaseTextMatcher.java
Last active March 25, 2021 06:37
Espresso (Hamcrest) matcher to match TextView text but ignoreCase
package com.example.app;
import android.support.test.espresso.matcher.BoundedMatcher;
import android.view.View;
import android.widget.TextView;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import static com.google.common.base.Preconditions.checkNotNull;
anonymous
anonymous / script.py
Created November 3, 2015 14:43
import cv2
import numpy as np
def get_frame_averages(video_path):
vc = cv2.VideoCapture(video)
if vc.isOpened():
rval, frame = vc.read()
else:
@JakeWharton
JakeWharton / ShampooRule.java
Last active August 31, 2023 15:47
Got flaky tests? Shampoo them away with a quick JUnit rule. Apache 2.
import org.junit.rules.TestRule;
import org.junit.runner.Description;
import org.junit.runners.model.Statement;
/** Got flaky tests? Shampoo them away. */
public final class ShampooRule implements TestRule {
private final int iterations;
public ShampooRule(int iterations) {
if (iterations < 1) throw new IllegalArgumentException("iterations < 1: " + iterations);
aahed
aalii
aargh
aarti
abaca
abaci
abacs
abaft
abaka
abamp
@chrisbanes
chrisbanes / SystemUiHelper.java
Last active March 2, 2024 18:57
SystemUiHelper
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@cfreshman
cfreshman / wordle-answers-alphabetical.txt
Last active March 9, 2024 17:43
Original Wordle answers from source code in alphabetical order. And if you write a solver, here's a leaderboard! https://freshman.dev/wordle/leaderboard Additional allowed guesses: https://gist.github.com/cfreshman/cdcdf777450c5b5301e439061d29694c NYTimes version: https://gist.github.com/cfreshman/a7b776506c73284511034e63af1017ee
aback
abase
abate
abbey
abbot
abhor
abide
abled
abode
abort
@Arinerron
Arinerron / permissions.txt
Last active March 27, 2024 04:59
A list of all Android permissions...
android.permission.ACCESS_ALL_DOWNLOADS
android.permission.ACCESS_BLUETOOTH_SHARE
android.permission.ACCESS_CACHE_FILESYSTEM
android.permission.ACCESS_CHECKIN_PROPERTIES
android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY
android.permission.ACCESS_DOWNLOAD_MANAGER
android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED
android.permission.ACCESS_DRM_CERTIFICATES
android.permission.ACCESS_EPHEMERAL_APPS
android.permission.ACCESS_FM_RADIO
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\