View JSTest.swift
let context = JSContext()!
let myNumber = 12
context.setObject(myNumber, forKeyedSubscript: "myNumber" as NSString)
let result = context.evaluateScript("myNumber + 20;")
print("JavaScript eval: \(result!.toInt32())")
View node_upgrade.sh
#!/bin/sh
node --version
npm install -g n
npm cache clean -f
sudo n stable
npm update -g
View helm_package.sh
#!/bin/sh
HELM_CHART_DIR="../../helm_charts"
helm dependency update
helm package -d "$HELM_CHART_DIR" .
helm repo index "$HELM_CHART_DIR"
View docker_prune.sh
#!/bin/sh
docker system prune --all --volumes
View gencert.sh
#!/bin/sh
mkdir -p log lib etc
sudo docker run -it --rm --name certbot -v $PWD/etc:/etc/letsencrypt -v $PWD/lib:/var/lib/letsencrypt -v $PWD/log:/var/log/letsencrypt certbot/certbot certonly --debug --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory
View display-off.conf
start on startup
task
exec /usr/sbin/vbetool dpms off
View landscape.cfg
video_allow_rotate = "true"
video_rotation = "3"
aspect_ratio_index = "19"
video_aspect_ratio_auto = false
video_aspect_ratio = .75
View Dockerfile
FROM ubuntu:latest
MAINTAINER john@deckerego.net
RUN apt-get --assume-yes update
RUN apt-get --assume-yes install docker.io iputils-ping net-tools netcat bash
ENV DOCKER_HOST 172.17.0.1
ENTRYPOINT ["ping", "localhost"]
View launch_wait.sh
#!/bin/bash
HOST="$1"
PORT="$2"
RUNNING=1
while [[ $RUNNING -ne 0 ]]; do
echo "Waiting for $HOST:$PORT..."
sleep 3
nc -z "$HOST" "$PORT"
View find_port.bash
#!/bin/bash
if [[ -z $2 ]]; then
echo "$0 SUBNET PORT"
exit -1
fi
CLASSC="$1"
PORT="$2"