This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# First install the GNU utils with Homebrew | |
# Reference this article: https://apple.stackexchange.com/questions/69223/how-to-replace-mac-os-x-utilities-with-gnu-core-utilities | |
# They can actually configured to replace the built-in tools without a prefix, but we don't need to require that just for bundlebuster | |
# This is the command from the SO answer: | |
# brew install coreutils findutils gnu-tar gnu-sed gawk gnutls gnu-indent gnu-getopt grep | |
# echo g-prefixed command if found, otherwise use base command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.nio.file.FileSystem | |
import java.nio.file.FileSystems | |
import java.nio.file.FileVisitResult | |
import java.nio.file.Files | |
import java.nio.file.Path | |
import java.nio.file.Paths | |
import java.nio.file.SimpleFileVisitor | |
import java.nio.file.attribute.BasicFileAttributes | |
allprojects { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function detect_unused_paths() { | |
local file | |
file="$1" | |
base_file_name="$(basename "${file%%.path}")" | |
for i in $(rg '<td>([A-Z_]+)</td>' --replace='$1' --no-line-number --no-filename --no-heading --only-matching -- "${file}") ; do | |
git --no-pager grep --quiet "\"${base_file_name}#${i}\"" -- '*.macro' '*.function' '*.testcase' || echo "${base_file_name}#${i}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelectorAll('input[type="checkbox"][value="indeterminate"]') .forEach(function(checkbox) { | |
checkbox.indeterminate = true; | |
let onchangeHandler = function() { | |
checkbox.value = ''; | |
checkbox.removeEventListener('change', onchangeHandler); | |
} | |
checkbox.addEventListener('change', onchangeHandler); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# openFiles // opens all files between current branch and master | |
# openFiles branchName // opens all files between "branchName" and master | |
# openFiles commitHash // opens all files between "commitHash" and master | |
# openFiles commitHash1 commitHash2 // opens all files between "commitHash1" and "commitHash2" | |
function openFiles() { | |
HASH1="${1}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
check_dependency fzf gsed pup || exit | |
DELIMITER=" : " | |
function getUsers() { | |
URL="${1}" | |
MARKUP="$(curl -s "https://github.com${URL}")" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
error() { | |
echo "$1" && exit 1 | |
} | |
while getopts "k:s:t:" FLAGS; do | |
case $FLAGS in | |
k) KEYS="${OPTARG}" ;; | |
s) SOURCE_DIRECTORY="${OPTARG}" ;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compile-common-jsp: | |
[java] Changes to environment variables are ignored when same JVM is used. | |
[echo] Mar 08, 2021 11:38:55 AM org.apache.jasper.servlet.TldScanner scanJars | |
[echo] INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. | |
[echo] Mar 08, 2021 11:38:56 AM org.apache.jasper.JspC execute | |
[echo] INFO: Generation completed with [0] errors in [1406] milliseconds | |
[javac] Compiling 218 source files to /Users/drewbrokke/Documents/liferay/liferay-portal/portal-web/classes/tomcat | |
[javac] /Users/drewbrokke/Documents/liferay/liferay-portal/portal-web/classes/tomcat/org/apache/jsp/WEB_002dINF/jsp/_005fservlet_005fcontext_005finclude_jsp.java:10: error: package javax.servlet does not exist | |
[javac] import javax.servlet.*; | |
[javac] ^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# "sog" stands for "Show On Github" | |
if [ $# -lt 1 ] | |
then | |
echo "Show On Github" | |
echo "Enter a grep search term. Any matching paths will be opened on Github if possible." | |
exit | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# check_dependency fzf gh jq || exit 1 | |
DEFAULT_USER="$(git config user.name)" | |
REPO_NAME="$(git rev-parse --show-toplevel | xargs basename)" | |
USER="${1:-${DEFAULT_USER}}" | |
PULLS_JSON="$(gh api "/repos/${USER}/${REPO_NAME}/pulls")" |
NewerOlder