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 org.junit.jupiter.api.Test; | |
import java.math.BigDecimal; | |
import static org.junit.jupiter.api.Assertions.assertEquals; | |
import static org.junit.jupiter.api.Assertions.assertThrows; | |
public | |
class OrderTest | |
{ |
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
cd ~/Downloads | |
wget https://download.java.net/java/GA/jdk11/28/GPL/openjdk-11+28_linux-x64_bin.tar.gz | |
cd /usr/lib/jvm | |
sudo tar -xvf ~/Downloads/openjdk-11+28_linux-x64_bin.tar.gz | |
for f in $(find /usr/lib/jvm/jdk-11/bin/ -executable -type f) | |
do | |
baseName="$(basename $f)" | |
echo "setting up $baseName" |
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 | |
# precondition: jq installed | |
pkg="jq" | |
if [[ $(dpkg-query -W -f='${Status}' $pkg 2>/dev/null) != "install ok installed" ]]; | |
then | |
echo "$pkg package not found: installing" | |
if sudo apt-get install -y $pkg; | |
then | |
echo "$pkg installation successful, continuing..."; |
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 org.sonatype.nexus.repository.storage.StorageFacet; | |
import org.sonatype.nexus.repository.storage.Query; | |
import org.joda.time.DateTime; | |
import org.joda.time.format.DateTimeFormat; | |
def fmt = DateTimeFormat.forPattern('yyyy-MM-dd HH:mm:ss'); | |
// Get a repository | |
def repo = repository.repositoryManager.get('nuget-releases'); | |
// Get a database transaction | |
def tx = repo.facet(StorageFacet).txSupplier().get(); |
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 | |
#for example "ubuntu_lsb_release -c -s" gives the ubuntu codename such as xenial or trusty | |
if [ ! -f /etc/upstream-release/lsb-release ] | |
then | |
# this is already ubuntu, delegate | |
/usr/bin/lsb_release $@ | |
exit 0 | |
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 | |
# official website: https://mran.microsoft.com/documents/rro/installation/#revorinst-lin | |
# fix package manager | |
sudo rm -rf /var/lib/dpkg/info/microsoft-r-open-* | |
sudo dpkg --remove --force-remove-reinstreq microsoft-r-open-mkl-3.3 | |
sudo dpkg --remove --force-remove-reinstreq microsoft-r-open-foreachiterators-3.3 | |
sudo dpkg --remove --force-remove-reinstreq microsoft-r-open-mro-3.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
#!/bin/bash | |
latestReleaseUrl="$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep "docker-compose-Linux-x86_64\"" | grep browser_download_url | sed "s/.*\(https.*x86_64\).*/\1/")" | |
echo "installing $latestReleaseUrl" | |
sudo curl -L $latestReleaseUrl -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
docker-compose 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 | |
# with ansible role from https://galaxy.ansible.com/wtanaka/vagrant | |
ansible-galaxy install wtanaka.vagrant | |
#-------------- | |
# or manually | |
version=1.9.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 | |
[ $# -lt 1 ] && echo "usage: $(basename $0) <target_ssh_user@target_ssh_hostname>" && exit 1; | |
target="$1" | |
docker pull alpine | |
for volume in $(docker volume ls -q) | |
do |
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 | |
git remote add github [email protected]:SeekersAdvisorsLabs/NEW_REPO.git | |
git push -u github master ; git push --all github; git push --tags github |
NewerOlder