Skip to content

Instantly share code, notes, and snippets.

@D4M4EVER
D4M4EVER / windows_and_office_kms_setup.adoc
Created April 8, 2024 23:00 — forked from jerodg/windows_and_office_kms_setup.adoc
Activate Windows and Office Using KMS Server

Microsoft Windows and Office KMS Setup

@D4M4EVER
D4M4EVER / LXCBindMount.md
Created June 29, 2023 23:03 — forked from JSinghDev/LXCBindMount.md
Create a bind mount from a Proxmox host on an unprivileged lxc container

Proxmox Assign Bind Mount To Unprivileged Container

In order for the LXC container to have full access the proxmox host directory, a subgid is set as owner of a host directory, and an ACL is used to ensure permissions.

Bind Mount dataset to LXC

Add the following line to /etc/pve/lxc/<CT_ID>.conf

mp0:/mount/point/on/host,mp=/mount/point/on/lxc

OR

pct set 100 -mp0 /mnt/bindmounts/shared,mp=/shared

######################################################################
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
#
# A "#" character in the very first column makes the rest of the line
# be ignored. Blank lines are ignored. Lines may be indented freely.
# A "\" character at the very end of the line indicates the next line
# should be treated as a continuation of the current one.
#
# The "pre-up", "up", "down" and "post-down" options are valid for all
# interfaces, and may be specified multiple times. All other options
@D4M4EVER
D4M4EVER / deleteAmazonSavedItems.js
Created May 14, 2022 16:21 — forked from MichaelLawton/deleteAmazonSavedItems.js
Removes all Amazon saved for later items on the cart page. It will only remove visible items. You might want to scroll first to make more items visible. To use paste code in developer console (Ctrl+Shift+J or Cmd+Opt+J in Chrome) then press enter.
function deleteSavedItems() {
var query = document.querySelectorAll("#sc-saved-cart input[value=Delete]")
if (query.length) {
query[0].click();
}
if (query.length > 1) {
setTimeout(deleteSavedItems,100);
}
else {
console.log('Finished');
@D4M4EVER
D4M4EVER / luks.md
Created January 25, 2022 20:35 — forked from aalvesjr/luks.md
[LINUX] Using LUKS with keyfile and many passphrases

CryptSetup and LUKS

[Cryptsetup](https://gitlab.com/cryptsetup/cryptsetup) is utility used to conveniently setup disk encryption based on DMCrypt kernel module.

LUKS (Linux Unified Key Setup) is the standard for Linux hard disk encryption

Install

apt-get install cryptsetup
@D4M4EVER
D4M4EVER / end.gcode
Last active September 9, 2021 15:08
Artillery Genius - Stock - Cura Slicer Start and end codes
; Artillery Genius
; Custom End G-code
G4 ; Wait
M220 S100 ; Reset Speed factor override percentage to default (100%)
M221 S100 ; Reset Extrude factor override percentage to default (100%)
G91 ; Set coordinates to relative
G1 F1800 E-3 ; Retract filament 3 mm to prevent oozing
G1 F3000 Z10 ; Move Z Axis up 20 mm to allow filament ooze freely
G90 ; Set coordinates to absolute
G1 X0 Y{machine_depth} F1000 ; Move Heat Bed to the front for easy print removal
@D4M4EVER
D4M4EVER / proxmox_resize_pve-root
Created March 16, 2021 00:22
Proxmox - Resize pve-root
# Check disk space before
df -h
# Delete local-lvm storage in gui
lvremove /dev/pve/data
lvresize -l +100%FREE /dev/pve/root
resize2fs /dev/mapper/pve-root
@D4M4EVER
D4M4EVER / sa-gen.sh
Created December 27, 2019 22:36 — forked from mc2squared/sa-gen.sh
Generate 100 service accounts and export their keys
#!/bin/bash
# requires gcloud command line tools; go to https://cloud.google.com/sdk/docs/quickstarts to get them
# max 100 service accounts per project
# run gcloud init --console-only first and select a project
#
# Want to use these for rclone? Service Account Loadbalancing is implemented in this build:
# https://git.fionera.de/fionera/rclone/releases
KEYS_DIR=~/keys
for name in service{1..100}; do
echo $name