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
[Unit] | |
Description=Keeps a tunnel to 'remote.example.com' open | |
After=network.target | |
[Service] | |
User=autossh | |
# -p [PORT] | |
# -l [user] | |
# -M 0 --> no monitoring | |
# -N Just open the connection and do nothing (not interactive) |
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
//install ipfs-cluster | |
cd $HOME | |
wget https://dist.ipfs.io/go-ipfs/v0.4.14-rc1/go-ipfs_v0.4.14-rc1_linux-amd64.tar.gz | |
tar xf go-ipfs_v0.4.14-rc1_linux-amd64.tar.gz | |
sudo mv go-ipfs/ipfs /usr/local/bin/ipfs | |
ipfs init | |
//installing go | |
cd $HOME/ && wget https://storage.googleapis.com/golang/go1.10.1.linux-amd64.tar.gz |
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
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 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
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 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 | |
# 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 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
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 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 | |
#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 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 | |
# 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 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 | |
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 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 | |
# with ansible role from https://galaxy.ansible.com/wtanaka/vagrant | |
ansible-galaxy install wtanaka.vagrant | |
#-------------- | |
# or manually | |
version=1.9.1 |