Skip to content

Instantly share code, notes, and snippets.

View steebchen's full-sized avatar
🌴
Working remotely

Luca Steeb steebchen

🌴
Working remotely
View GitHub Profile
@steebchen
steebchen / 00.howto_install_phantomjs.md
Last active February 13, 2018 22:17 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 2.1.1

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@steebchen
steebchen / 1-deps.sh
Last active May 21, 2019 21:47
Kubernetes on Ubuntu
#!/bin/sh
# run this on all nodes
apt-get update && apt-get install -qy docker.io
apt-get update && apt-get install -y apt-transport-https \
&& curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list
@steebchen
steebchen / 1-install-ceph-helm.sh
Last active February 24, 2019 01:03
Set up ceph with kubernetes
# Requirements: an existing and running k8s cluster
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
helm init
# taken from http://docs.ceph.com/docs/master/start/kube-helm/
helm serve &
# wait for helm serve to be ready
@steebchen
steebchen / install-helm.sh
Created September 6, 2018 16:09
install helm on k8s kubeadm cluster with rbac
# install helm
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
kubectl create serviceaccount -n kube-system tiller
kubectl create clusterrolebinding tiller-binding --clusterrole=cluster-admin --serviceaccount kube-system:tiller
# run tiller with specific tiller account
helm init --service-account tiller
@steebchen
steebchen / install.sh
Created September 6, 2018 16:11
install ingress-nginx on kubeadm cluster
helm install stable/nginx-ingress --name ingress --namespace kube-system --set controller.hostNetwork=true,controller.kind=DaemonSet
@steebchen
steebchen / ssh.sh
Last active December 11, 2018 02:02
sudo sed -i "s/#\{0,1\}Port .*/Port xxxx/" /etc/ssh/sshd_config
sudo sed -i "s/#\{0,1\}PermitRootLogin yes/PermitRootLogin no/" /etc/ssh/sshd_config
sudo sed -i "s/#\{0,1\}PasswordAuthentication yes/PasswordAuthentication no/" /etc/ssh/sshd_config
service sshd reload
sudo sed -i "s/#\{0,1\}Port .*/Port xxxx/" /etc/ssh/sshd_config
sudo sed -i "s/#\{0,1\}PasswordAuthentication yes/PasswordAuthentication no/" /etc/ssh/sshd_config
service sshd reload
@steebchen
steebchen / photon-go-multi-selection.md
Created June 23, 2019 21:31
Photon Go client: query for multiple things in a single query

Proposal for selecting multiple things as alternative for the initial proposal

Generated Prisma client types

The prisma types could be generated with all relations a type can have. For example, when a User can have Posts and a Post has an Author, the respective types define the relation in the struct.

// generated code by prisma

Select API

var result struct{
  User struct{
    Name User.Name.Field
    Email User.Email.Field
    Posts []Post
  }

Photon Go Versioning

The user should be able to solely work with Go tools:

go get github.com/prisma/photongo

A specific version gets locked with the Go modules lockfile: