Skip to content

Instantly share code, notes, and snippets.

Jason Hagglund TheMetalCode

Block or report user

Report or block TheMetalCode

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@TheMetalCode
TheMetalCode / README.md
Last active Jan 27, 2020
Extract The High-Level Coverage Stats from a Jacoco HTML Report
View README.md

Let's say the following describes your situation:

  • You're using JaCoCo to measure code coverage for a Java/Kotlin project (eg an Android app), a perfectly good tool for the job that unfortunately does not generate JSON reports.
  • You're using a 3rd party SaaS provider like CircleCI, which can sometimes perform unpredictably when uploading large amounts of files to build artifact storage. Things like HTML coverage reports from JaCoCo, for instance.
  • As a result you'd like to zip the HTML report prior to saving it to artifacts but would still like the high-level coverage stats to be made transparent without having to download and unzip the HTML report.

If you're in this boat along with me, here is one way you might go about extracting this infromation from the html report.

The risk here is that this is theoretically brittle - it's tied to whatever the DOM happens to be for the HTML that JaCoCo generates. In reality, it hasn't changed in quite some time. YMMV.

@TheMetalCode
TheMetalCode / A_Way_To_Mostly_Automate_FastlaneSession_Update.md
Last active Jan 31, 2020
Mostly Automated Way to Update FASTLANE_SESSION
View A_Way_To_Mostly_Automate_FastlaneSession_Update.md

https://github.com/fastlane/fastlane/issues/13833

This script may be useful to you if you use fastlane for iOS CI builds and your Apple developer portal account uses 2-factor authentication. There is reason to suppose that Apple may not be persisting these sessions for as long as they used to, and hence you might find yourself needing to update FASTLANE_SESSION for your CI projects more often than usual.

This script is a way to mostly automate the process of updating FASTLANE_SESSION if you use CircleCI as your CI provider. It expects to find your Apple username in env as FASTLANE_USER, your Apple password as FASTLANE_PASSWORD, and your CircleCI API token as CIRCLE_API_TOKEN. It then executes fastlane spaceauth and waits for you to put in your 2FA code. From there, it parses out the session data and then uses the CircleCI API to populate the specified projects with the newly updated FASTLANE_SESSION. You'll

View keybase.md

Keybase proof

I hereby claim:

  • I am themetalcode on github.
  • I am hagglundized (https://keybase.io/hagglundized) on keybase.
  • I have a public key ASAdDCG9jbjF7lJBWE-UJ6G59In8ZjdSVlrLOmtG-0AEqwo

To claim this, I am signing this object:

@TheMetalCode
TheMetalCode / browsermob-proxy.rb
Last active Jun 22, 2017 — forked from rubytester/browsermob-proxy.rb
homebrew formula browsermob-proxy
View browsermob-proxy.rb
require "formula"
class BrowsermobProxy < Formula
homepage "http://bmp.lightbody.net/"
url "https://github.com/lightbody/browsermob-proxy/releases/download/browsermob-proxy-2.1.4/browsermob-proxy-2.1.4-bin.zip", :using => :curl
sha256 "27c4080411adff919586e909c664c73bebb8ba8bfcaea259ce58327222e5e8fb"
version "2.1.4"
def install
prefix.install Dir["*"]
end
View keybase.md

Keybase proof

I hereby claim:

  • I am TheMetalCode on github.
  • I am hagglundized (https://keybase.io/hagglundized) on keybase.
  • I have a public key whose fingerprint is 3041 D13E 581B 55D9 A0EC AA97 7401 7AF5 D737 A355

To claim this, I am signing this object:

You can’t perform that action at this time.