This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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/.."; |
This file contains hidden or 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/.."; |
This file contains hidden or 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
| if (typeof window !== 'undefined' && 'serviceWorker' in navigator) { | |
| window.navigator.serviceWorker.getRegistrations().then(registrations => { | |
| registrations.forEach(r => r.unregister()) | |
| }) | |
| } |
This file contains hidden or 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
| exports.handler = (event, context, callback) => { | |
| context.succeed({ | |
| statusCode: 200, | |
| headers: { | |
| "Content-Type" : "image/png" | |
| }, | |
| body: "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAA4pklEQVR4Ae2dd1xUd9b/LwWxY++KxnSjMRtN302yMSXrpuTZjfntZpM1m90YjRQYCgPMwEjvIoqKvaPYCxZAsceuiAXFgoACoShz7/S58/vcPCS7Ppgswgxc7pw/3i99Ucbhcs/b7/fc8z2HsVgsRBuzPXunc6Bc8Un4jKg14ADYDZL9AuQvVVfXONM1aj3MlZccWP9Og7gZwyeDcKBg5T0+0GeHdqPr0/bQRWhjcvP2jYWsjkJQJmAGfANmYJwRGXNSHqJ8S6vV0fWyIby6ioGYxnGRI3dDUkZgAuYGTFzEIyWsvOfnhoOz7fMakbCIg4cOjw0ICj3RICjLL8ADY0RUbIYyPLITXTcrYzYwrHJAVy7qsQXcDHcD5MQDy4NxN7JB3f0N3y+yr2tEwiKOHT/hBlmt/GVZNcIEzkdExQym62c9ONXwxyCiSw0rKst/ReV+j5W7fWo8udI+rhEJizh16gwTGKz4e5gq0ijI6CHgQUlsfOKTdB1bjib6iRchoKrGq6pfBzmu7cZTa4bRNSRh2QXHj5/sJQuQrxIk1EzKEpNTR9K1bD6ahLHPQ1Z1jYTUtFWWiQ3u9Tfj+c10LUlY0ufMmXNv+foHVQjyaQFXZs1O70/X8+HRzHx5LLaBdwT5NBfWv+NC49msHnQ9SViS5nzhBSY4NGwatoN8C4XF4zVOzJ2/sANd16ajnfP7YZDVjZbIqmFbWAhh/YauKQlL0pw5e66rr1/gPEE6VsAEaWUvXrqcrm0T0C74Yzds584KwmkprJ+ryXQx+xOpXzMSF |
This file contains hidden or 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
| openssl s_client -connect owapi.net:443 </dev/null | |
| ex +'g/BEGIN CERTIFICATE/,/END CERTIFICATE/p' <(echo | openssl s_client -showcerts -connect ) -scq > comodo-ecc-ca.cert | |
| keytool -import -file comodo-ecc-ca.cert -alias comodo-ecc-ca -keystore truststore |