Skip to content

Instantly share code, notes, and snippets.

View SnapperGee's full-sized avatar

Snap SnapperGee

  • San Francisco, CA
  • 18:37 (UTC -07:00)
View GitHub Profile
@SnapperGee
SnapperGee / LICENSE.txt
Created January 7, 2024 20:34
sed vs tail-cut benchmark
Copyright 2024 Snap <https://github.com/SnapperGee>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE S
@SnapperGee
SnapperGee / view-testreport.gradle
Created September 7, 2020 20:48
Gradle task that opens generated unit test summary results HTML page
/*
* This Gradle task assumes 2 things:
*
* 1.) The "open" command of the shell this task is executed in opens HTML files with a web browser.
* 2.) The name of the generated test report summary HTML page created by the Test task is set to its default name of "index.html".
*/
tasks.register("view-testreport", Exec)
{
dependsOn += test
@SnapperGee
SnapperGee / xman.sh
Last active July 15, 2021 06:10
Bash script that opens man page with x-man-page
#!/usr/bin/env bash
# Xman v0.2
# On macOS, opens x-man page in new window for scripts
# that have man pages. Otherwise attempt to open with
# default man command.
for argument in "$@"; do
# If man page exists open with x-man-page
@SnapperGee
SnapperGee / DBReader.java
Last active April 12, 2023 06:49
Java class for getting general info (table and column names) from SQLite Databases
package countit.db;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
@SnapperGee
SnapperGee / view-javadoc.gradle
Last active September 5, 2020 04:31
Gradle task that opens generated JavaDoc package overview HTML page
/*
* This Gradle task assumes 3 things:
*
* 1.) The "open" command of the shell this task is executed in opens HTML files with a web browser.
* 2.) The name of the generated JavaDoc overview HTML page created by the JavaDoc task is set to its default name of "index.html".
* 3.) That Java 11 is being used. If that's not the case, then the `options.links` argument should be updated to the correct Java version.
*
* It should also be noted that any link reference to a Java class that's part of the `java.lang` package will have the "java.lang"
* qualifier omitted. If this behavior is unwanted then delete or update the `options.noQualifiers` argument to refelct the desired
* behavior.