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 javax.crypto.Cipher; | |
import javax.crypto.spec.IvParameterSpec; | |
import javax.crypto.spec.SecretKeySpec; | |
import java.nio.ByteBuffer; | |
import java.nio.charset.StandardCharsets; | |
import java.security.GeneralSecurityException; | |
import java.util.Base64; | |
class DecryptPasswordJetBrainsBuiltIn { | |
public static void main(String... args) throws GeneralSecurityException { |
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.util.Map; | |
import java.util.regex.MatchResult; | |
import java.util.regex.Pattern; | |
public final class TemplateMessage { | |
private static final Pattern MESSAGE_ARGUMENT_PATTERN = Pattern.compile("\\$\\{([^}]+?)}"); | |
private final String template; | |
public TemplateMessage(final String template) { |
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
<?php | |
function profiler_start($flag) { | |
global $profiler_stack; | |
$profiler_stack[] = [ | |
'flag' => $flag, | |
'start' => microtime(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
#!/bin/sh | |
flags=$(xset -q | awk 'NR==2' | awk '{ print $10 }') | |
if test "$flags" = ffffe7fe | |
then | |
xset led off | |
else | |
xset led on | |
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 | |
set -euo pipefail | |
IFS=$'\n\t' | |
latest_version=$(wget -q -O - https://papermc.io/api/v1/paper | jq -r '.versions[]' | sort -Vr | head -n1) | |
latest_build=$(wget -q -O - https://papermc.io/api/v1/paper/$latest_version | jq -r '.builds.latest') | |
echo "loading server binary for minecraft version $latest_version build $latest_build" | |
wget -q -O "paper-$latest_version-$latest_build.jar" "https://papermc.io/api/v1/paper/$latest_version/$latest_build/download" |
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
if ! { [[ $(command -v readlink) ]] && readlink --version | grep -q "GNU coreutils"; } then | |
# not using GNU readlink, so using ... | |
if [[ $(command -v python3) ]]; then | |
# ... python substitute, if python is installed, otherwise ... | |
readlink() { | |
python3 -c 'import os,sys;print(os.path.realpath(sys.argv[1]), end='\'\'')' "$2" | |
} | |
else | |
# ... manual readlink implementation | |
readlink() { |
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 | |
set -euo pipefail | |
IFS=$'\n\t' | |
DOCKER_IMAGE="composer:latest" | |
name="project_$(date "+%Y%m%d_%H%M%S_%N")" | |
# Get this projects root directory by analysing the location of this script | |
# it is assumed that this script is inside a direct subdirectory, e.g. project-root/scripts/docker.sh |