Skip to content

Instantly share code, notes, and snippets.

@alexklibisz
alexklibisz / 0-firefly-grafana-example.md
Last active October 30, 2022 12:12
Firefly + Grafana Example
@xirixiz
xirixiz / UGW3_Wireguard.md
Last active February 25, 2024 22:12 — forked from pamolloy/README.md
Ubiquiti USG configuration for Wireguard

The purpouse is to have a WireGuard server running with a configuration for 2 clients to connect to the WireGuard server.

Installation - First steps

Follow the instructions for downloading and installing the WireGuard package here: https://github.com/WireGuard/wireguard-vyatta-ubnt

curl -OL https://github.com/WireGuard/wireguard-vyatta-ubnt/releases/download/${RELEASE}/${BOARD}-${RELEASE}.deb
sudo dpkg -i ${BOARD}-${RELEASE}.deb
@bxparks
bxparks / parseflags.sh
Last active February 21, 2024 12:07
Simple Bash Shell Command Line Processing Template
#!/bin/bash
#
# Self-contained command line processing in bash that supports the
# minimal, lowest common denominator compatibility of flag parsing.
# -u: undefined variables is an error
# -e: exit shell on error
set -eu
function usage() {
#!/usr/bin/env python
import math
import sys
from moviepy.editor import AudioClip, VideoFileClip, concatenate_videoclips
# Get average RGB of part of a frame. Frame is H * W * 3 (rgb)
# Assumes x1 < x2, y1 < y2
#!/bin/bash
###
### my-script — does one thing well
###
### Usage:
### my-script <input> <output>
###
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.
@yvesh
yvesh / proxmox-zfs-encryption.md
Last active March 12, 2024 04:52
Proxmox 6.1 ZFS native full disk (ZFS root) encryption.

Simple guide for fulldisk encryption with Proxmox and ZFS native encryption

Install normally using the installer, after the setup reboot into recovery mode (from the USB stick). Make sure to install in UEFI mode (you need systemd-boot).

If the USB stick is not working for you, because of the old Kernel version (2.6.x), you can also use an Ubuntu 19.10 / 20.04 boot stick. ZFS suport is enabled there out of the box.

Steps:

@benok
benok / opkg_list_installed.sh
Last active February 24, 2024 10:57
[entware] List up manually installed packages
#!/bin/ash
list_pkgs() {
opkg list-installed | cut -f 1 -d " "
}
show_deps() {
opkg depends $1 | sed -e 1d -e 's/^\s*//'
}
@afanjul
afanjul / install-docker-inside-lxc.txt
Last active June 14, 2023 18:08
Install Docker inside LXC container - Proxmox VE
1.Add “aufs” or “overlay” (or both) to /etc/modules-load.d/modules.conf in your PVE host and reboot. Check it with lsmod | grep -E 'overlay|aufs'
2.Use a LXC image with unprivilege features (you can check them here: https://uk.images.linuxcontainers.org/)
3.Create the container with unprivilege option, and “keyctl=1, nesting=1” features (Options section in proxmox).
4.Maybe you would want to mount an external point into /var/lib/docker (Resources section in proxmox)
5.Check this link (https://docs.docker.com/storage/storagedriver/overlayfs-driver/#configure-docker-with-the-overlay-or-overlay2-storage-driver) to change your storage-driver in docker to use aufs or overlay2.
6.Install portainer: https://portainer.readthedocs.io/en/latest/deployment.html
Voilá…
@jtommi
jtommi / filewatcher.sh
Last active August 22, 2020 16:16
Simple script that watches for created, deleted, modified or moved files within the specified folder. It uses inotify-tools
#!/bin/sh
sudo inotifywait -m -r -e create -e modify -e move -e delete --format '%T - Event: %e - %w%f' --timefmt '%T' /etc /var /home /boot
@flowchartsman
flowchartsman / kali_osx_persistence_wifi.md
Last active June 14, 2023 13:00 — forked from widdowquinn/kali_osx_persistence_wifi.md
Kali Linux Live USB with encrypted persistence and wireless on Macbook Pro/Air without networking.

Kali Linux Bootable USB with Persistence and Wireless on OSX

Tutorials for running live Kali on OSX often require you have networking on your laptop to apt install the drivers, but without an ethernet adapter you're not going to be able to do that, so this tutorial will cover a method of doing this manually, using another thumbdrive or external data source.

Download the appropriate Kali Linux .iso

I used a 64 bit .iso image, downloaded via HTTP.