Skip to content

Instantly share code, notes, and snippets.

View exocode's full-sized avatar
🏠
Working from home

Jan exocode

🏠
Working from home
View GitHub Profile

Native Instruments OSX Uninstaller

Sometimes it is necessary to uninstall and reinstall your Native Instruments software, drivers and files as a solution for technical issues. Unfortunately Native Instruments has removed their official uninstaller for OSX and their online documentation on the process is far from complete or accurate; even worse it's annoying to go through every directory and manually remove every file.

This .COMMAND script will launch a terminal instance and guide you through the process of removing all Native Instruments software, drivers and files for you.

SOURCE: https://github.com/spencerthayer/Native-Instruments-OSX-Uninstaller/blob/master/README.md

How to Use the Uninstaller

@exocode
exocode / test.rb
Created November 16, 2022 14:33
AR tests (example for counter_culutre)
#!/usr/bin/env ruby
# frozen_string_literal: true
#######################################
## just run in your terminal:
##
## > ruby test.rb
##
## If you need logging callbacks
## just uncomment the affected lines
Recurring Payments
- invoice.paid
- invoice.payment_failed
- customer.subscription.updated (subscription changes)
- invoice.payment_action_required (3DS)
One-Time Payments
- checkout.session.completed
@exocode
exocode / [...nextauth].ts
Created September 27, 2022 18:05 — forked from RafalFilipek/[...nextauth].ts
Hasura + next-auth
import NextAuth, { type NextAuthOptions } from "next-auth";
import { JWT } from "next-auth/jwt";
import * as jwt from "jose";
export const authOptions: NextAuthOptions = {
// the rest is just like in tutorials. Session, callbacks etc.
jwt: {
encode: async ({ secret, token }) => {
if (!token) {
console.warn("encode: No token provided");
@exocode
exocode / sidekiq.rb
Last active August 16, 2022 23:01
Bitnami Redis sentinel Sidekiq Rails with
# /config/initializers/sidekiq.rb
# REDIS_URL ONLY in development environment needed
# REDIS_SENTINEL must be provided (eg: redis-headless.redis.svc.cluster.local if using Kubernetes)
# REDIS_PASSWORD must be provided, otherwise: edit this example
# in order to retrieve the Redis IP addresses.
SENTINELS = Resolv.getaddresses(ENV['REDIS_SENTINEL']).map do |address|
# 'address' will get resolved into IP addresses
{ host: address, port: 26_379, password: ENV['REDIS_PASSWORD'] } # reading from
end if Rails.env.production?
@exocode
exocode / self-hosted-civo-crossplane.md
Last active July 3, 2022 20:18
Demo for Upbound (not working)

Crossplane, Upbound and Civo

Installing

You have two options to install Crossplane:

  • Either you deploy your Crossplane manifests it through an existing cluster (Minikube, bare-metal, on premise or any other desired cloud provider,...)
  • or through Upbound Enterprise, which is a kind of managed Kubernetes cluster, which solves the chicken-egg problem.
@exocode
exocode / Dockerfile
Created November 11, 2021 01:10
NextJS production Dockerfile
# Install dependencies only when needed
FROM node:alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
#################################
@exocode
exocode / .zshrc
Created November 8, 2021 10:16
brew list and .zsh_rc to investigate issue
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
# if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
# source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
# fi
#!/bin/sh
# [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
@exocode
exocode / README-kubedb-postgis.md
Created November 2, 2021 01:07
Setup HA-Postgis with KubeDB (on Minikube) - The fast way

Setup KubeDB (on Minikube) - The fast way

Install Minikube

Create a Minikube (or Kind) cluster with

  • at least 2 CPUs
  • nailed down to Kubernetes version 1.21.x
  • and enough memory
❯ k logs -n kubedb kubedb-kubedb-community-6d65bcb74d-dzcnw
I1101 22:29:29.460044 1 log.go:184] FLAG: --add-dir-header=“false”
I1101 22:29:29.460092 1 log.go:184] FLAG: --alsologtostderr=“false”
I1101 22:29:29.460097 1 log.go:184] FLAG: --bypass-validating-webhook-xray=“false”
I1101 22:29:29.460100 1 log.go:184] FLAG: --enable-analytics=“true”
I1101 22:29:29.460103 1 log.go:184] FLAG: --log-backtrace-at=“:0”
I1101 22:29:29.460105 1 log.go:184] FLAG: --log-dir=“”
I1101 22:29:29.460108 1 log.go:184] FLAG: --log-file=“”
I1101 22:29:29.460111 1 log.go:184] FLAG: --log-file-max-size=“1800"
I1101 22:29:29.460114 1 log.go:184] FLAG: --log-flush-frequency=“5s”