Skip to content

Instantly share code, notes, and snippets.

View perfectra1n's full-sized avatar

perfectra1n perfectra1n

View GitHub Profile
@perfectra1n
perfectra1n / migrating.md
Last active November 19, 2023 22:59
Migrating to new major PostgreSQL version with CNPG

Migrating to new major PostgreSQL version with CNPG

  1. Create new cluster with the monolith bootstrap above
  2. Cut over all Postgres services after it’s done initializing
  3. Wave goodbye and pray for the lost data in the 5 minutes it took to cut over (could’ve cut over earlier, but I was worried it was going to have a stroke when initializing, so I waited)

Create new cluster with the monolith bootstrap above

First, need to create the new cluster, that's going to be replacing the old one, with the bootstrap section being the important one, to yoink all the data from the previous one

2023/11/16 22:42:51 ...s/process/manager.go:188:Add() [T] Start 65569aeb-31: PUT: /v2/<user>/<repo>/manifests/db5e586 (request)
2023/11/16 22:42:51 ...eb/routing/logger.go:47:func1() [T] router: started PUT /v2/<user>/<repo>/manifests/db5e586 for 10.233.81.22:48164
2023/11/16 22:42:51 ...eb/routing/logger.go:78:func1() [W] router: failed PUT /v2/<user>/<repo>/manifests/db5e586 for 10.233.81.22:48164, panic in 521.6ms @ container/container.go:516(container.UploadManifest), err=runtime error: invalid memory address or nil pointer dereference
2023/11/16 22:42:51 ...s/process/manager.go:231:remove() [T] Done 65569aeb-31: PUT: /v2/<user>/<repo>/manifests/db5e586
2023/11/16 22:42:51 ...rs/common/errpage.go:26:RenderPanicErrorPage() [E] PANIC: runtime error: invalid memory address or nil pointer dereference
/usr/local/go/src/runtime/panic.go:914 (0x43ec3e)
/go/src/code.gitea.io/gitea/modules/web/routing/logger_manager.go:116 (0x1aa5068)
/usr/local/go/src/runtime/panic.go:914 (0x43ec3e)
/usr/local/go/src/runtime
@perfectra1n
perfectra1n / get_latest_trilium_server.sh
Created May 23, 2022 21:10
One liner to download the latest version of Trilium server
curl -s https://api.github.com/repos/zadam/trilium/releases/latest \
| grep "browser_download_url.*x64-server" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi -
@perfectra1n
perfectra1n / migrate.py
Created April 2, 2021 22:41
Migrate Gitlab projects to Gitea repos.
import argparse
import gitlab
import sys
import log
import requests
import json
"""
MAIN FUNCTIONS
hashcat (v6.1.1) starting in benchmark mode...
Benchmarking uses hand-optimized kernel code by default.
You can use it in your cracking session by setting the -O option.
Note: Using optimized kernel code limits the maximum supported password length.
To disable the optimized kernel code in benchmark mode, use the -w option.
* Device #1: CUDA SDK Toolkit installation NOT detected.
CUDA SDK Toolkit installation required for proper device support and utilization
Falling back to OpenCL Runtime