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 -eo pipefail | |
help () { | |
cat <<EOF | |
Usage: ./local.bash <action> | |
Actions | |
get_version print current version | |
bump_version bumps version |
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 -eo pipefail | |
. ./uninstall.sh | |
echo "$script_line" >> ~/.bashrc | |
mkdir -p "$HOME/.local/var/venv/" |
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 | |
# Original idea: https://github.com/bartekj/aws-tools | |
awsenv() { | |
IFS=$'\n' | |
for a in "$@"; do | |
[ "$a" == "--save" -o "$a" == "-s" ] && { save_env=1; } || { | |
name="$a" | |
} | |
done |
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 -i | |
function find_config_path () ( | |
test / == "$PWD" && return || test -f "$1" && echo "$PWD/$1" && return || cd .. && find_config_path "$1" | |
) | |
local_awsenv () { | |
IFS=$'\n' | |
for a in "$@"; do | |
[ "$a" == "--save" -o "$a" == "-s" ] && { save_env=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
@PersistenceContext | |
private EntityManager entityManager; | |
org.hibernate.internal.SessionImpl s = (org.hibernate.internal.SessionImpl)entityManager.unwrap(org.hibernate.Session.class); | |
s.persistenceContext.collectionsByKey |
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
com.gignative.elexicon.util.ContextProvider.CONTEXT.getBean(org.springframework.jdbc.core.JdbcTemplate.class).getDataSource().getConnection().getMetaData().getURL() |
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 -eo pipefail | |
if [ -z "$1" ]; then | |
cat <<EOF | |
usage: | |
aws-pricing <instance_type> display pricing per availability zone | |
aws-pricing --instance-types [pattern] show all available instance types | |
filtered by optional pattern |
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 | |
# go to ~/.m2 or other folder and run ./setup.sh according to below help | |
if [ -z "$3" ]; then | |
cat <<EOF | |
usage: ./setup.sh <jfrog_username> <jfrog_password> <artifactory_url> | |
example: ./setup.sh my_username my_password https://myjfrogaccount.jfrog.io/artifactory/mymavenrepositroyname | |
EOF | |
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
function exponentialBackoff(i, dt) { | |
const f = j => j >= 0 ? Math.exp(j/3)*dt : 0 | |
const ret = f(i)-f(i-1) | |
if(ret < dt) { | |
return dt | |
} else { | |
return ret | |
} | |
} |
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 -eou pipefail | |
VERSION="$2" | |
cd /tmp | |
set -x | |
# trap "rm $5" EXIT | |
rm SHA256SUM || true |