Skip to content

Instantly share code, notes, and snippets.

_ _ _ ____ _ _
| | | | __ _ ___| | __ | __ ) __ _ ___| | _| |
| |_| |/ _` |/ __| |/ / | _ \ / _` |/ __| |/ / |
| _ | (_| | (__| < | |_) | (_| | (__| <|_|
|_| |_|\__,_|\___|_|\_\ |____/ \__,_|\___|_|\_(_)
A DIY Guide
@jaredsburrows
jaredsburrows / jacoco.gradle
Created December 21, 2017 16:59
Jacoco for multi-module projects
apply {
plugin("jacoco")
}
def include = [""]
def exclude = [
// Android
"**/R.class",
"**/R\$*.class",
"**/Manifest*.*",
import 'package:universal_html/html.dart' as html;
import 'logging.dart';
void removeViewport() {
final html.Element? existingViewportTag =
html.querySelector('meta[name="viewport"]');
if (existingViewportTag != null) {
existingViewportTag.remove();
@jaredsburrows
jaredsburrows / yahoofinance.gs
Last active May 25, 2023 13:16
Google Sheets - YAHOOFINANCE()
/*
* Copyright (C) 2022 Jared Burrows
*
* 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
@jaredsburrows
jaredsburrows / build.yml
Last active March 18, 2023 19:04
Flutter - Android + iOS + Web
name: build
on:
push:
branches:
- main
pull_request:
types: [ opened, labeled, unlabeled, synchronize ]
env:
@jaredsburrows
jaredsburrows / RxBus1.java
Last active March 16, 2023 10:44
RxBus for RxJava 1 and RxJava 2
import rx.Observable;
import rx.subjects.PublishSubject;
import rx.subjects.SerializedSubject;
import rx.subjects.Subject;
/**
* @author <a href="mailto:jaredsburrows@gmail.com">Jared Burrows</a>
*/
public final class RxBus {
private final Subject<Object, Object> bus = new SerializedSubject<>(PublishSubject.create());
language: android
dist: xenial
os: linux
env:
global:
- ADB_INSTALL_TIMEOUT=8
@jaredsburrows
jaredsburrows / Rx1TestBase.java
Last active July 28, 2019 04:16
RxAndroid overriding schedulers
import org.junit.After;
import org.junit.Before;
import rx.Scheduler;
import rx.android.plugins.RxAndroidPlugins;
import rx.android.plugins.RxAndroidSchedulersHook;
import rx.schedulers.Schedulers;
/**
* JUnit Tests.
*
@jaredsburrows
jaredsburrows / FinalTest.java
Created December 31, 2018 00:30
Playing around with finalize()
public class FinalTest {
private static int count = 0;
public static void main(String[] args) throws Exception {
System.gc();
System.out.println("Start");
for (int i = 0; i < 100_000; i++) {
new OtherClass(i);
}
##########################################################################################
# App Compat
#
# https://code.google.com/p/android/issues/detail?id=78377
# https://github.com/albertvaka/kdeconnect-android/blob/master/proguard-rules.pro
# http://stackoverflow.com/questions/24809580/noclassdeffounderror-android-support-v7-internal-view-menu-menubuilder
##########################################################################################
-keep class !android.support.v7.internal.view.menu.*MenuBuilder*, android.support.v7.** { *; }
-keep interface android.support.v7.** { *; }