Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
APP=$1
RUNNING=$(dokku ls | grep $APP | awk '{print $4}')
if [ "$RUNNING" == "" ]; then
echo "CRITICAL - $APP does not exist."
exit 2
fi
# print all the prime numbers up to 'upto'
# quick project for UTAustinX UT.9.10x
# Effective Thinking Through Mathematics
# and Open Source Society University
num = 2
upto = 1000
while num < upto:
prime = True

Keybase proof

I hereby claim:

  • I am timhberry on github.
  • I am timhberry (https://keybase.io/timhberry) on keybase.
  • I have a public key whose fingerprint is BC9F 3A0B B3B7 19E5 BE72 03C4 C018 C56F 31B4 274C

To claim this, I am signing this object:

provider "google" {
credentials = "${file("./creds/serviceaccount.json")}"
project = "gke-tf-demo"
region = "europe-west1"
}
resource "google_container_cluster" "gke-cluster" {
name = "my-first-gke-cluster"
network = "default"
zone = "europe-west1-b"
initial_node_count = 3
}
resource "google_container_node_pool" "extra-pool" {
name = "extra-node-pool"
zone = "europe-west1-b"
cluster = "${google_container_cluster.gke-cluster.name}"
initial_node_count = 3
}
#!/bin/sh
set -e
# first arg is `-f` or `--some-option`
if [ "${1#-}" != "$1" ]; then
set -- docker "$@"
fi
# if our command is a valid Docker subcommand, let's invoke it through Docker instead
# (this allows for "docker run docker ps", etc)
FROM jenkins/slave
USER root
# Install docker
ENV DOCKER_VERSION 18.03.1-ce
RUN set -x \
&& curl -fSL "https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz" -o docker.tgz \
&& tar -xzvf docker.tgz \
provider "google-beta" {
credentials = "${file("./creds/serviceaccount.json")}"
project = "<your-project-name>"
region = "us-east1"
}
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: repd-east1-b-c
provisioner: kubernetes.io/gce-pd
parameters:
type: pd-standard
replication-type: regional-pd
zones: us-east1-b, us-east1-c