Skip to content

Instantly share code, notes, and snippets.

View Cassie-von-Clausewitz's full-sized avatar
🏠
Working from home

Cassie von Clausewitz Cassie-von-Clausewitz

🏠
Working from home
View GitHub Profile
@Cassie-von-Clausewitz
Cassie-von-Clausewitz / StaticMapBuilder.java
Created May 21, 2017 22:19
A builder for a static Google Maps URL
import android.support.annotation.Nullable;
import com.fernandocejas.arrow.strings.Strings;
import java.util.ArrayList;
import java.util.List;
/**
* Builder for a static google maps URL. Must be initialized with a valid API key with the google maps service enabled.
*
val callStackPosition: Int = 2
fun Activity.trace(message: String) {
if (this is BaseActivity) {
this.logger.trace(message)
} else {
Log.v(Thread.currentThread().stackTrace[callStackPosition].className, message)
}
}
@Cassie-von-Clausewitz
Cassie-von-Clausewitz / build.gradle
Created August 15, 2017 03:32
Lockhunter Gradle task
task clean(type: Exec) {
ext.lockhunter = '\"C:\\Program Files\\LockHunter.exe\"'
def buildDir = file(new File("build"))
commandLine 'cmd', "$lockhunter", '/delete', '/silent', buildDir
}
@Cassie-von-Clausewitz
Cassie-von-Clausewitz / AcceptanceTestRule.kt
Created September 8, 2017 05:40
Blank extension of an ActivityTestRule, need to extend if you want to be able to do something before or after the activity is launched or finished
import android.app.Activity
import android.content.Intent
import android.support.test.rule.ActivityTestRule
import org.junit.runner.Description
import org.junit.runners.model.Statement
class AcceptanceTestRule<A : Activity?>(activityClass: Class<A>?, initialTouchMode: Boolean, launchActivity: Boolean) : ActivityTestRule<A>(activityClass, initialTouchMode, launchActivity) {
override fun afterActivityLaunched() {
super.afterActivityLaunched()
# Description: Boxstarter Script
# Author: Kyle Riedemann <me@kyleriedemann.com>
# Last Updated: 2018-05-26
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
{
"basics": {
"name": "Kyle Riedemann",
"label": "Android Developer",
"email": "kylealanr@gmail.com",
"phone": "(404) 666-1004",
"website": "http://kyleriedemann.com",
"summary": "I'm a passionate software developer focusing mostly on Android. I've spent the last few years living in the Twin Cities, but have recently moved back to Oklahoma.",
"location": {
"postalCode": "OK 73003",
class FilteredLogPolicy @Inject constructor(
private val logDao: LogDao,
private val filterRepository: FilterRepository,
private val dispatcher: CoroutineDispatcher = Dispatchers.IO
) {
suspend operator fun invoke() = withContext(dispatcher) {
filterRepository.filter.catch {
logError(it)
emit(LogFilters())
}.flatMapLatest {
@Cassie-von-Clausewitz
Cassie-von-Clausewitz / can_i_have_the_guy.txt
Last active January 4, 2024 21:10
it's a guy to send ppl when ur mad
🖕 👨
🐛💤👔🐛
⛽ 👢
⚡ 8=👊=D💦
🎸 🌂
👢 👢