Skip to content

Instantly share code, notes, and snippets.

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 / 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 / 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
language: android
dist: xenial
os: linux
env:
global:
- ADB_INSTALL_TIMEOUT=8
@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);
}
@jaredsburrows
jaredsburrows / Retry.kt
Created September 18, 2018 22:14
Test Retry Rule
@Retention(AnnotationRetention.RUNTIME)
annotation class Retry(
val retryCount: Int = -1
)
language: android
env:
global:
- ADB_INSTALL_TIMEOUT=8
jdk:
- oraclejdk8
before_install:
apply {
plugin("com.android.application")
plugin("jacoco")
plugin("com.github.kt3k.coveralls")
plugin("io.gitlab.arturbosch.detekt")
}
// Creates tasks based on the application build variant (productFlavor + buildType = variant)
android.applicationVariants.all { variant ->
def variantName = variant.name.capitalize()
@jaredsburrows
jaredsburrows / BstPreOrder.java
Created January 28, 2018 21:27
Unit test with System.out
import api.TreeNode;
public final class BstPreOrder {
public static void printPreOrder(TreeNode<Integer> node) {
if (node == null) {
return;
}
System.out.print(node.value + " ");
printPreOrder(node.left);
@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*.*",