Skip to content

Instantly share code, notes, and snippets.

View valorad's full-sized avatar
🤕
è

Valorad the Oneiroseeker valorad

🤕
è
  • SCET
  • Dhirim
  • 17:47 (UTC -04:00)
View GitHub Profile
@dragonfire1119
dragonfire1119 / install-openwrt-on-proxmox.md
Last active March 6, 2024 21:33
Install OpenWRT on Proxmox
@wcxaaa
wcxaaa / btrfs-system-on-the-go.md
Created June 5, 2022 14:41
btrfs 子卷系统迁移清单

准备

要准备一个目标系统,或者至少要live cd

开始迁移 进chroot

  • 执行btrfs send 和 btrfs rec
  • 挂子卷,挂efi
  • /etc/fstab (删subvolid,改uuid, 加swap space)
  • /etc底下:hostname hosts resolv.conf
@kekru
kekru / traefik-redirect-path.md
Last active March 12, 2024 15:15
Traefik redirect / (root) to sub path with Docker labels

Traefik: redirect base or root path to a subpath

This is tested with Traefik 1.7

This is how to redirect the root or base path to a sub path in Traefik using Docker labels:
Goals

  • https://example.com -> https://example.com/abc/xyz/
  • https://example.com/ -> https://example.com/abc/xyz/
  • https://example.com/something -> no redirect
@bradtraversy
bradtraversy / mysql_cheat_sheet.md
Last active April 26, 2024 06:57
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

# Install these packages (use your favorite AUR tool here)
yay -S minikube kubectl docker-machine-driver-kvm2 libvirt qemu-headless ebtables
# Get libvirt going
sudo systemctl enable libvirtd.service
sudo usermod -a -G libvirt $(whoami)
# This fix thanks to http://blog.programmableproduction.com/2018/03/08/Archlinux-Setup-Minikube-using-KVM/
sudo virsh net-autostart default
@DjinnGA
DjinnGA / prepare-iso.sh
Last active April 4, 2021 01:59
Convert MacOS 10.14 Mojave Beta Installer App To iso File
#!/bin/bash
hdiutil create -o /tmp/Mojave.cdr -size 8g -layout SPUD -fs HFS+J
hdiutil attach /tmp/Mojave.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ 10.14\ Beta.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build
mv /tmp/Mojave.cdr.dmg ~/Desktop/InstallSystem.dmg
hdiutil detach /Volumes/Install\ macOS\ 10.14\ Beta
hdiutil convert ~/Desktop/InstallSystem.dmg -format UDTO -o ~/Desktop/Mojave.iso
@wcxaaa
wcxaaa / docker_mongo_Init.md
Last active March 23, 2020 14:01
Dockerized mongoDB initialization

First create a mongod config file. e.g.

# mongod.conf
# Where and how to store data.
storage:
  dbPath: /data/db
  directoryPerDB: true
  journal:
    enabled: true
@wcxaaa
wcxaaa / docker_mySQL_Init.md
Last active February 22, 2018 03:47
Initializing docker mysql-server container
$ docker run --name mysql-c1 -d -v /workspace/docking:/workspace/docking mysql/mysql-server

Remember to wait for a few seconds and then continue.

$ docker logs mysql-c1 2>&1 | grep GENERATED # On Windows it's "findstr" instead of "grep"
# Copy that password from output: e.g. GENERATED ROOT PASSWORD: Axegh3kAJyDLaRuBemecis&EShOs
$ docker exec -it mysql-c1 mysql -u root -p
@agentsim
agentsim / highsierra_bootable.sh
Created June 10, 2017 02:23
Create bootable ISO from HighSierra Installer
# Generate a BaseSystem.dmg with 10.13 Install Packages
hdiutil attach /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/highsierra/
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg
@wsargent
wsargent / win10-dev.md
Last active March 21, 2024 04:27
Windows Development Environment for Scala

Windows 10 Development Environment for Scala

This is a guide for Scala and Java development on Windows, using Windows Subsystem for Linux, although a bunch of it is applicable to a VirtualBox / Vagrant / Docker subsystem environment. This is not complete, but is intended to be as step by step as possible.

Harden Windows 10

Read the entire Decent Security guide, and follow the instructions, especially: