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 / hosts
Last active September 18, 2023 19:58
Custom adblock list (with whitelisted analytic admin panels)
This file has been truncated, but you can view the full file.
# Title: StevenBlack/hosts
#
# This hosts file is a merged collection of hosts from reputable sources,
# with a dash of crowd sourcing via GitHub
#
# Date: 24 January 2021 21:02:05 (UTC)
# Number of unique domains: 59,895
#
# Fetch the latest version of this file: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
# Project home page: https://github.com/StevenBlack/hosts
name: auto pull request
on:
push:
branches:
- wip/*
- feat/*
- fix/*
- ci/*
- refactor/*
- chore/*
@steebchen
steebchen / client.txt
Last active March 29, 2021 16:38
go client api examples
// ------------------------ Reading Data ------------------------
// -- Find Records --
// Find all posts
posts, err := client.Post.FindMany().Exec(ctx)
// Find a user by ID
user, err := client.User.FindUnique(db.User.ID.Equals(2)).Exec(ctx)
@steebchen
steebchen / recover.go
Created March 19, 2021 15:59
Recover mnemonic seed phrase with a single missing word and a public key
package main
import (
"bufio"
"log"
"os"
"strconv"
"strings"
hdwallet "github.com/miguelmota/go-ethereum-hdwallet"
@steebchen
steebchen / mdtool
Last active February 12, 2021 13:28
bugfixes by imchairmanm
#!/bin/bash
set -e
swap() {
set -eu
a=$1
b=$2
@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

example

const user = await prisma.user.update({
  where: {
    email: 'alice@prisma.io',
  },
  data: {
    posts: {
## example
```js
const user = await prisma.user.update({
where: {
email: 'alice@prisma.io',
},
data: {
posts: {
@steebchen
steebchen / check.sh
Last active June 9, 2020 07:34
Check if a given Github Action succeeds
#!/bin/sh
# This script checks if the prisma e2e test workflow passes
# Check the end of the file for usage
check() {
str=$(curl -s "https://github.com/$1/workflows/$2/badge.svg")
case "$str" in
*"passing"*)
@steebchen
steebchen / insert
Last active March 23, 2020 14:37
Shift files in a naming scheme of "xx-yy" where xx is a number to create space at a given index
#!/bin/bash
set -eu
new=$1
for file in $(ls | sort -g -r)
do
filename=$(basename "$file")
number=$(echo $filename | cut -d- -f1)