Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
sudo mkdir -p /opt/bin
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /opt/bin/docker-compose
sudo chmod +x /opt/bin/docker-compose
#!/bin/bash
for FILE in *.geojson # cycles through all files in directory (case-sensitive!)
do
echo "converting file: $FILE..."
FILENEW=`echo $FILE | sed "s/.mif/_new.shp/"` # replaces old filename
ogr2ogr \
-f "ESRI Shapefile" \
"$FILENEW" "$FILE"
done
@gorbypark
gorbypark / kube.sh
Last active December 10, 2018 02:56
#!/bin/sh
PRIVATE_IPV4=$(/bin/ip -o -4 addr list ens33 | awk '{print $4}' | cut -d/ -f1)
CNI_VERSION="v0.6.0"
mkdir -p /opt/cni/bin
curl -L "https://github.com/containernetworking/plugins/releases/download/${CNI_VERSION}/cni-plugins-amd64-${CNI_VERSION}.tgz" | tar -C /opt/cni/bin -xz
CRICTL_VERSION="v1.11.1"
mkdir -p /opt/bin
{
"ignition": {
"config": {},
"security": { "tls": {} },
"timeouts": {},
"version": "2.2.0"
},
"networkd": {},
"passwd": {
"users": [
#!/bin/sh
touch /opt/itvwerks
{
"ignition": {
"config": {},
"security": {
"tls": {}
},
"timeouts": {},
"version": "2.2.0"
},
"networkd": {},
@gorbypark
gorbypark / simple-vue-apollo-subscription.vue
Last active August 14, 2021 11:47
A simple vue-apollo subscription example
<!--
This is a simple vue single file component example of using a subscription with vue-apollo.
This starts out as a query, and then if there are any changes to the underlying data,
the subscription updates it. The subscription works by holding open a websocket connection
to the GraphQL server. This was tested using Hasura.io and PostgreSQL, but should work with
any GraphQL implementation that supports websocket subscriptions. In the example, the
PostgreSQL table would be in a schema named "myschema" and a table named
"mytable" and that table would have two columns, "id" and "name".
-->
@gorbypark
gorbypark / K8s-DigitalOcean-CoreOS.md
Created May 10, 2018 11:12 — forked from kevashcraft/K8s-DigitalOcean-CoreOS.md
How to Setup Kubernetes on DigitalOcean with CoreOS

Kubernetes on DigitalOcean with CoreOS

Let's look at an example of how to launch a Kubernetes cluster from scratch on DigitalOcean, including kubeadm, an Nginx Ingress controller, and Letsencrypt certificates.

Overview

Environment

We'll be creating a four-node cluster (k8s-master, k8s-000...k8s-002), load balancer, and ssl certificates.

Table of Contents

  1. Install Kubernetes
@gorbypark
gorbypark / coreos-ignition-docker-start-on-boot.MD
Last active April 18, 2021 20:29
Container Linux (CoreOS) and how to get docker to start on boot using ignition.

Container Linux (CoreOS), digitalocean and starting docker on boot

Container Linux (CoreOS) doesn't enable the docker systemd service by default. If you start a container with the --restart=always flag, for example, your container will not start up again automatically after a reboot. This may be desirable if you're running a cluster with an orchestration system that will handle this for you, but if you are using Container Linux with a single instance you might want your containers to start up by themselves. Of course you can easily enable to systemd service from the command line, but the best way is to pass an Ignition config file during the droplet creation process.

  1. Under the "Select additional options" section, select "User Data"
  2. In the box, paste the following Ignition config
{
  "ignition": { "version": "2.2.0" },
  "systemd": {
    "units": [{
 "name": "docker.service",