Skip to content

Instantly share code, notes, and snippets.

FROM ubuntu:latest
LABEL \
maintainer="mdPlusPlus" \
description="Host your own ZeroTier network controller and manage it via ztncui."
# Avoid tzdata configuration
ARG DEBIAN_FRONTEND=noninteractive
@mdPlusPlus
mdPlusPlus / badblocks.txt
Last active March 16, 2025 00:23
How to check new hard drives with badblocks
badblocks -b 4096 -p 0 -s -t 0 -v -w DEVICE [LAST_BLOCK] [FIRST_BLOCK]
-b block_size
-p num_passes
-s Show the progress of the scan
-t test_pattern
-v Verbose mode
-w Use write-mode test
@mdPlusPlus
mdPlusPlus / luks2.txt
Created April 11, 2021 12:21
cryptsetup LUKS2
cryptsetup luksFormat \
--type luks2 \
--cipher aes-xts-plain64 \
--key-size 512 \
--hash sha256 \
DEVICE [KEYFILE]
cryptsetup luksAddKey \
--type luks2 \
[-d EXISTING_KEYFILE] \
@mdPlusPlus
mdPlusPlus / Dockerfile
Last active August 7, 2022 09:39
Dockerfile for oxend (https://oxen.io/)
FROM ubuntu:focal
LABEL "author"="mdPlusPlus"
LABEL "name"="oxend"
LABEL "description"="Dockerfile for oxend (https://oxen.io/)"
# blockchain syncing
EXPOSE 22022/tcp
# remote node connection
EXPOSE 22023/tcp
@mdPlusPlus
mdPlusPlus / Dockerfile
Created August 19, 2022 15:32
Dockerfile for monerod (https://www.getmonero.org/)
FROM ubuntu:focal
LABEL "author"="mdPlusPlus"
LABEL "name"="monerod"
LABEL "description"="Dockerfile for monerod (https://www.getmonero.org/)"
EXPOSE 18081/tcp
VOLUME ["/root/.bitmonero"]
@mdPlusPlus
mdPlusPlus / modals.html
Created January 8, 2023 22:07
Multiple modal example, HTML/CSS/JavaScript
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {font-family: Arial, Helvetica, sans-serif;}
/* The Modal (background) */
.modal {
display: none; /* Hidden by default */
@mdPlusPlus
mdPlusPlus / run_session.sh
Last active July 12, 2023 00:04
Bash script template to use several different Session IDs in parallel
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
SESSION_PATH='~/Downloads/'
SESSION_APPIMAGE='session-desktop-linux-x86_64-1.10.8.AppImage'
IDENTITIES_PATH='~/Downloads/_Session_identities/'
IDENTITY='per'
LOCKFILE='/tmp/session_per'
@mdPlusPlus
mdPlusPlus / modping.sh
Last active July 14, 2023 21:45
Modping for Session communities
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# check for argument
set +u
if [ -z "${1}" ]
then
echo "Usage: modping.sh %community_link%"