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 / 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💦
🎸 🌂
👢 👢
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 {
{
"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",
# 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:
@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()
@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
}
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 / 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.
*
@Cassie-von-Clausewitz
Cassie-von-Clausewitz / GestureDetectors.java
Created May 3, 2017 17:41
OnGestureEvent implimentations for use with GestureDetectorCompat. Makes it easer to use lambdas.
import android.view.GestureDetector;
import android.view.MotionEvent;
import com.fernandocejas.arrow.functions.Function;
import com.fernandocejas.arrow.functions.Predicate;
public class GestureDetectors {
public static class OnDown implements GestureDetector.OnGestureListener {
private final Predicate<MotionEvent> predicate;
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->