Skip to content

Instantly share code, notes, and snippets.

View muzi502's full-sized avatar
🐳
touch 🐟 ing

Reimu muzi502

🐳
touch 🐟 ing
View GitHub Profile
@tprelog
tprelog / enable-docker.sh
Last active November 23, 2023 01:58
Use docker-compose on TrueNAS SCALE 22.12 (Bluefin) without Kubernetes
#!/usr/bin/env bash
#
# Enable docker and docker-compose on TrueNAS SCALE (no Kubernetes)
#
# This script is a hack! Use it at your own risk!!
# Using this script to enable Docker is NOT SUPPORTED by ix-systems!
# You CANNOT use SCALE Apps while using this script!
#
# 1 Create a dedicated Docker dataset in one of your zpools
@muzi502
muzi502 / registry_gc.sh
Last active November 5, 2020 01:01
use shell to gc instead /bin/registry command , delete all old images blobs only save the tag latest images blobs
#!/bin/bash
set -x
v2=$1
v2=${v2:="/var/lib/registry/docker/registry/v2"}
cd ${v2}
all_blobs=/tmp/all_blobs.list
: > ${all_blobs}
# delete unlink blob's link file in _layers
for link in $(find repositories -type f -name "link" | grep -E "_layers\/sha256\/.*"); do
link_sha256=$(echo ${link} | grep -Eo "_layers\/sha256\/.*" | sed 's/_layers\/sha256\///g;s/\/link//g')
Serial Keys:
FU512-2DG1H-M85QZ-U7Z5T-PY8ZD
CU3MA-2LG1N-48EGQ-9GNGZ-QG0UD
GV7N2-DQZ00-4897Y-27ZNX-NV0TD
YZ718-4REEQ-08DHQ-JNYQC-ZQRD0
GZ3N0-6CX0L-H80UP-FPM59-NKAD4
YY31H-6EYEJ-480VZ-VXXZC-QF2E0
ZG51K-25FE1-H81ZP-95XGT-WV2C0
VG30H-2AX11-H88FQ-CQXGZ-M6AY4
@notheotherben
notheotherben / README.md
Last active January 21, 2021 16:19
VSCode GCC+WSL Configuration

Build and debug C in VSCode on Windows Subsystem for Linux

This set of launch.json and task.json files allow you to build and debug individual C files from within Windows while using the gcc collection installed within your WSL environment.

Steps

Ensure you have GCC+GDB installed in WSL

sudo apt-get update
sudo apt-get install -y gcc gdb
@ueokande
ueokande / benchmark-commands.md
Last active January 22, 2024 12:38 — forked from jkreps/benchmark-commands.txt
Kafka Benchmark Commands

Benchmark commands

Producer

Setup

bin/kafka-topics.sh \
  --zookeeper zookeeper.example.com:2181 \
  --create \
@perrygeo
perrygeo / base64_padding.md
Last active October 25, 2023 16:20
Avoiding TypeError: Incorrect padding with Python's base64 encoding

Avoiding padding errors with Python's base64 encoding

>>> import base64
>>> data = '{"u": "test"}'
>>> code = base64.b64encode(data)
>>> code
'eyJ1IjogInRlc3QifQ=='