Skip to content

Instantly share code, notes, and snippets.

View kaspernissen's full-sized avatar

Kasper Borg Nissen kaspernissen

View GitHub Profile

Keybase proof

I hereby claim:

  • I am kaspernissen on github.
  • I am phennex (https://keybase.io/phennex) on keybase.
  • I have a public key ASCvT6XAkcCOHs4E_HrSLXwh2EuXnITCDp0CaZ1FIeHD8go

To claim this, I am signing this object:

@kaspernissen
kaspernissen / plan.yaml
Created January 10, 2019 13:03
Simple example of a shuttle plan for Go.
scripts:
build:
description: Build the docker image
actions:
- shell: shuttle template -o Dockerfile Dockerfile.tmpl
- shell: docker build -f $tmp/Dockerfile -t $(shuttle get docker.destImage):$(shuttle get docker.destTag) .
push:
description: Push the docker image
actions:
- shell: docker push $(shuttle get docker.destImage):$(shuttle get docker.destTag)
#!/bin/sh
# Install Docker
curl -sSL get.docker.com | sh && \
sudo usermod pi -aG docker
# Disable Swap
sudo dphys-swapfile swapoff && \
sudo dphys-swapfile uninstall && \
sudo update-rc.d dphys-swapfile remove
@kaspernissen
kaspernissen / hostname_and_ip.sh
Created December 19, 2017 20:57
Script for configuring hostname and static ip of rasbian
#!/bin/sh
hostname=$1
ip=$2 # should be of format: 192.168.1.100
dns=$3 # should be of format: 192.168.1.1
# Change the hostname
sudo hostnamectl --transient set-hostname $hostname
sudo hostnamectl --static set-hostname $hostname
sudo hostnamectl --pretty set-hostname $hostname
@kaspernissen
kaspernissen / init.sh
Last active October 18, 2019 04:17
init.sh
#!/bin/sh
# Install Docker
curl -sSL get.docker.com | sh && \
sudo usermod pi -aG docker
# Disable Swap
sudo dphys-swapfile swapoff && \
sudo dphys-swapfile uninstall && \
sudo update-rc.d dphys-swapfile remove