Skip to content

Instantly share code, notes, and snippets.

View Darkflib's full-sized avatar
💭
Kubernetes: because you thought one moving part wasn't enough.

Mike Preston Darkflib

💭
Kubernetes: because you thought one moving part wasn't enough.
View GitHub Profile
@Darkflib
Darkflib / gist:8c40e9e0bb60883bd70fb34972b5954a
Last active November 19, 2022 06:00
minio gateway to s3 compatible wasabi with cache + s3fs and ecryptfs
mkdir /mnt/wasabi-cache
lvcreate -L 100G -n wasabi-cache vg0
mkfs.ext4 /dev/vg0/wasabi-cache
docker run -d -p 9000:9000 --name minio-wasabi -e "MINIO_CACHE_DRIVES=/mnt/wasabi-cache" -e "MINIO_CACHE_EXPIRY=40" \
-e "MINIO_ACCESS_KEY=AKKEYKEYKEYKEYKEY" -e "MINIO_SECRET_KEY=mysecret123123123123123" \
minio/minio gateway s3 https://s3.wasabisys.com:443
# add the password to the s3 credentials file...
echo $ACCESS_KEY:$SECRET_KEY > ~/.passwd-s3fs
# if you have multiple buckets, there is a different syntax
echo $BUCKET:$ACCESS_KEY:$SECRET_KEY > ~/.passwd-s3fs
# Create the directory where the S3 bucket will be mounted
mkdir -p ~/s3/mattsmells
# Mount the bucket
@Darkflib
Darkflib / on mac
Last active October 9, 2018 05:38
Remote notifications
while true; do nc -l 12345 | say; done
@Darkflib
Darkflib / Tools
Created October 19, 2018 11:20
Tools
Storage
https://rclone.org/docs/
https://www.minio.io/
https://github.com/s3fs-fuse/s3fs-fuse
CLI
https://github.com/Bash-it/bash-it
autossh
tmux
aws-cli
echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable-wireguard.list
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' > /etc/apt/preferences.d/limit-unstable
apt update
apt install wireguard
mkdir -p /etc/wireguard
wg genkey | tee /etc/wireguard/test-private.key | wg pubkey > /etc/wireguard/test-public.key
@Darkflib
Darkflib / build.sh
Last active November 27, 2018 14:50
#!/bin/bash
# Install dependencies (debootstrap)
sudo apt-get install debootstrap
# Fetch the latest Kali debootstrap script from git
curl "http://git.kali.org/gitweb/?p=packages/debootstrap.git;a=blob_plain;f=scripts/kali;hb=HEAD" > kali-debootstrap &&\
sudo debootstrap kali-rolling ./kali-root http://http.kali.org/kali ./kali-debootstrap &&\
# Import the Kali image into Docker
sudo tar -C kali-root -c . | sudo docker import - darkflib/kali-rolling &&\
sudo rm -rf ./kali-root &&\
username
password
version: "2"
networks:
gitea:
external: false
services:
gitea:
image: gitea/gitea:latest
environment:
# Set the window title
function title {
echo -ne "\033]0;"$*"\007"
}
title "MBP"
# autossh
function as() {
@Darkflib
Darkflib / socat_socks_proxy.sh
Created September 11, 2019 18:34 — forked from lene/socat_socks_proxy.sh
Using tor as SOCKS proxy with SOCAT
socat TCP-LISTEN:<localport> SOCKS4A:localhost:<host>:<remoteport>,socksport=9050
# for example, to ssh into secret.shell.server.org via tor, do:
$ socat TCP-LISTEN:22222 SOCKS4A:localhost:secret.shell.server.org:22,socksport=9050 &
$ ssh localhost -p 22222