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
enabledTLSProtocols=TLSv1,TLSv1.1,TLSv1.2,TLSv1.3 |
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
#Enable daemon | |
org.gradle.daemon=true | |
# Try and findout the best heap size for your project build. | |
org.gradle.jvmargs=-Xmx18G -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options=-Xmx18G | |
# Modularise your project and enable parallel build | |
org.gradle.parallel=true | |
# Enable configure on demand. | |
org.gradle.configureondemand=true |
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
gradle dependencyInsight --dependency log4j-core |
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
wget https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem | |
keytool -keystore amazon.jks -importcert -file ./global-bundle.pem | |
# note: remember this password -- you'll need it in intellij |
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
#!/usr/bin/env bash | |
cd /tmp | |
MVN_VERSION="3.6.3" | |
wget https://www-eu.apache.org/dist/maven/maven-3/$MVN_VERSION/binaries/apache-maven-$MVN_VERSION-bin.tar.gz | |
sudo mkdir /usr/local/apache-maven | |
tar -xzf apache-maven-$MVN_VERSION-bin.tar.gz | |
sudo cp -r apache-maven-$MVN_VERSION /usr/local/apache-maven |
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 | |
gradle_version=7.3.1 | |
wget -c https://services.gradle.org/distributions/gradle-${gradle_version}-bin.zip | |
sudo unzip gradle-${gradle_version}-bin.zip -d /opt | |
sudo ln -s /opt/gradle-${gradle_version} /opt/gradle | |
printf "export GRADLE_HOME=/opt/gradle\nexport PATH=\$PATH:\$GRADLE_HOME/bin\n" | sudo tee /etc/profile.d/gradle.sh | |
source /etc/profile.d/gradle.sh | |
# check installation | |
gradle -v |
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
DELIMITER | | |
CREATE FUNCTION bin_to_uuid(b BINARY(16)) | |
RETURNS CHAR(36) DETERMINISTIC | |
BEGIN | |
DECLARE hex CHAR(32); | |
SET hex = HEX(b); | |
RETURN CONCAT(LEFT(hex, 8), '-', MID(hex, 9,4), '-', MID(hex, 13,4), '-', MID(hex, 17,4), '-', RIGHT(hex, 12)); | |
END | |
| |
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
'use strict'; | |
const crypto = require("crypto"); | |
const sessionKey = 'CLOUDFRONT_SESSION_ID'; | |
const regex = '(^|[^;]+)\\s*' + sessionKey + '\\s*=\\s*([^;]+)'; | |
const expirationMinutes = 2 * 60; // 2 hours | |
const SHTS = 'Strict-Transport-Security'; | |
function getSessionCookie(cookieValue) { |
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
# encrypt secret.txt | |
gpg --symmetric --yes --batch --cipher-algo AES256 --passphrase=XXXXX secret.txt && rm -f secret.txt | |
# decrypt secret.txt | |
gpg --decrypt --yes --batch --passphrase=XXXXX secret.txt.gpg > secret.txt && rm -f secret.txt.gpg |
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
# function to test for parent directories | |
__has_parent_dir () { | |
test -d "$1" && return 0; | |
current="." | |
while [ ! "$current" -ef "$current/.." ]; do | |
if [ -d "$current/$1" ]; then | |
return 0; | |
fi | |
current="$current/.."; |
NewerOlder