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 | |
declare -A JDKS | |
JDKS[8]="/usr/lib/jvm/jdk1.8.0_251" | |
JDKS[11]="/usr/lib/jvm/jdk-11.0.9" | |
JDKS[14]="/usr/lib/jvm/jdk-14.0.1" | |
JDKS[16]="/usr/lib/jvm/jdk-16.0.2" | |
if [ "$#" -ne 1 ]; then |
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
public class Hard { | |
public static void main(String[] args) { | |
for(int i = 0; i < 100; i++) { | |
for(int j = 0; j < 100; j++) { | |
assert addWithoutPlus(i,j) == i + j; | |
} | |
} |
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
#cloud-config | |
package_update: true | |
runcmd: | |
- snap install docker --channel=17.03/stable | |
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
unbind C-b | |
set-option -g prefix C-x | |
bind-key C-x send-prefix | |
bind -n M-Left select-pane -L | |
bind -n M-Right select-pane -R | |
bind -n M-Up select-pane -U | |
bind -n M-Down select-pane -D | |
# reload config file (change file location to your the tmux.conf you want to use) | |
bind r source-file ~/.tmux.conf |
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 | |
# install openebs | |
kubectl apply -f https://raw.githubusercontent.com/openebs/openebs/master/k8s/openebs-operator.yaml | |
kubectl apply -f https://raw.githubusercontent.com/openebs/openebs/master/k8s/openebs-storageclasses.yaml | |
# install helm | |
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash |
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 | |
apt-get update | |
apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - | |
add-apt-repository \ |
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
# --volume-plugin-dir=/var/lib/rancher/etc/vol-plugins | |
apt update && apt install -y docker.io && docker pull rancher/server:stable && docker pull rancher/agent:v1.2.6 | |
apt update && apt install -y docker.io && docker pull rancher/agent:v1.2.6 | |
docker run -d --name=rancher-server --restart=unless-stopped -p 8080:8080 rancher/server:stable | |
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl | |
chmod a+x kubectl | |
mv kubectl /usr/local/bin | |
mkdir ~/.kube | |
touch ~/.kube/config |
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
# --volume-plugin-dir=/var/lib/rancher/etc/vol-plugins | |
apt update && apt install -y docker.io && docker pull rancher/server:stable && docker pull rancher/agent:v1.2.6 | |
apt update && apt install -y docker.io && docker pull rancher/agent:v1.2.6 | |
docker run -d --name=rancher-server --restart=unless-stopped -p 8080:8080 rancher/server:stable |
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 | |
while true; do | |
kubectl get pvc --all-namespaces -o json | jq '.items[] | select(.metadata.annotations["volume.beta.kubernetes.io/storage-class"]=="auto-provision" and .status.phase=="Pending")' | jq -r '[.metadata.name, .spec.resources.requests.storage] | @csv' | sed s/\"//g | sed s/Gi//g | sed s/-pvc/-pv/ | awk -F ',' '{ print "./kismatic volume add " $2 " " $1 " -r 1 -d 2 -c=\"auto-provision\" -a 10.10.*.*"}' | sh | |
sleep 10 | |
done; |
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
apt-get install -y apt-transport-https ca-certificates && \ | |
apt-key adv \ | |
--keyserver hkp://ha.pool.sks-keyservers.net:80 \ | |
--recv-keys 58118E89F3A912897C070ADBF76221572C52609D && \ | |
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list && \ | |
apt-get update && \ | |
apt-get install -y docker-engine=1.12.6-0~ubuntu-xenial && \ | |
docker run -d --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.0 <server-url> |
NewerOlder