Skip to content

Instantly share code, notes, and snippets.

Guide Linux on LUKS and LVM

This guide describes how to prepare an USB stick or storage drive before installing Linux, including partitioning, creating LUKS and LVM, and configuring the OS after installation. Note that most commands need to be executed with sudo permissions.

Author: David Wettstein
Version: 1.1.1, 2022-07-28
License: Copyright (c) 2020-2022 David Wettstein, licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
Link: https://gist.github.com/dwettstein/8e3ac6afd8925e1e4236ac71d68e137d

Table of Contents

@dwettstein
dwettstein / Git.md
Last active September 11, 2023 00:05
Getting Started with Git
@dwettstein
dwettstein / ds215j_bootstrap_ng.md
Created February 1, 2021 15:27 — forked from ffeldhaus/ds215j_bootstrap_ng.md
Bootstrap Synology ds215j using optware-ng

Bootstrap the Synology DS215j with optware-ng

I tried the instructions described in the Blogpost Bootstrap DS215j to install optware for ds215j but was unsatisfied with the long outdated packages it provided. Luckily, there now is optware-ng which is a fork of optware and provides recent packages.

This is how I managed to install optware-ng on my Synology ds215j inspired by the instructions in the Gist Boostrap the Synology DS215j with optware, ipkg, and sudo:

Download & Install ipkg in a persistent manner

# become root

sudo -i

@dwettstein
dwettstein / gist:91b01557ea9d4a770b0f20e94b435a75
Created January 19, 2021 10:40 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@dwettstein
dwettstein / battery_report.bat
Last active July 13, 2021 19:48
Get a battery report on Windows
:: ----------------------------------------------------------------------------
:: Get a battery report for your device as a HTML and XML file.
::
:: File-Name: battery_report.bat
:: Author: David Wettstein
:: Version: 1.1.0
:: License: Copyright (c) 2020-2021 David Wettstein,
:: licensed under the MIT License
:: (https://dwettstein.mit-license.org/)
:: Link: https://gist.github.com/dwettstein/b4dc091089ff0814ae7b58c22c58ba6e
@dwettstein
dwettstein / media_shortcuts.ahk
Last active December 22, 2022 11:28
AutoHotkey Media Control Shortcuts
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#!Left::Send {Media_Prev} ; Win + Alt + Left
#!Down::Send {Media_Play_Pause} ; Win + Alt + Down
#!Right::Send {Media_Next} ; Win + Alt + Right
#!Up::Send {Volume_Mute} ; Win + Alt + Up
#!PgUp::Send {Volume_Up} ; Win + Alt + PageUp
@dwettstein
dwettstein / Edit_with_Vim_WSL.ps1
Last active October 29, 2021 20:40
With this registry command you can create a Windows Explorer context menu entry "Edit file with WSL Vim" using Vim on WSL (Windows Subsystem for Linux).
<#
.SYNOPSIS
With this registry command you can create a Windows Explorer context menu
entry "Edit file with WSL Vim" using Vim on WSL (Windows Subsystem for Linux).
.DESCRIPTION
With this registry command you can create a Windows Explorer context menu
entry "Edit file with WSL Vim" using Vim on WSL (Windows Subsystem for Linux).
You can execute the context-menu entry quickly with the keyboard-shortcut
@dwettstein
dwettstein / letsencrypt-jetty.sh
Last active March 27, 2018 16:54 — forked from xkr47/letsencrypt-jetty.sh
How to use Letsencrypt certificate & private key with Jetty
# input: fullchain.pem and privkey.pem as generated by the "letsencrypt-auto" script when run with
# the "auth" aka "certonly" subcommand
# convert certificate chain + private key to the PKCS#12 file format
openssl pkcs12 -export -out keystore.pkcs12 -in fullchain.pem -inkey privkey.pem -password pass:your_password
# convert PKCS#12 file into Java keystore format
keytool -importkeystore -srckeystore keystore.pkcs12 -srcstoretype PKCS12 -destkeystore keystore.jks -srcstorepass your_password -deststorepass your_password -noprompt
# don't need the PKCS#12 file anymore
@dwettstein
dwettstein / Edit_with_Vim_Git_Bash.reg
Last active October 29, 2021 20:43
With this registry command you can create a Windows Explorer context menu entry "Edit with Vim" using included Vim of Git Bash for Windows.
Windows Registry Editor Version 5.00
; -----------------------------------------------------------------------------
; With this registry command you can create a Windows Explorer context menu
; entry "Edit with Vim" to edit a file with Vim included in Git for Windows.
;
; You can execute the context-menu entry quickly with the keyboard-shortcut
; `Shift`+`F10`, `v` (on Windows 7 also: `Alt`+`f`, `v`), after selecting
; the file.
;