Skip to content

Instantly share code, notes, and snippets.

View epcim's full-sized avatar

Petr Michalec epcim

View GitHub Profile
epcim /
Created April 28, 2023 11:30 — forked from sometimesfood/
Small script that re-encrypts GPG-encrypted files with a new key
checkusage() {
[[ $# -lt 2 ]] && err_exit 'Usage: KEY_ID FILE...'
err() { echo -e "$@" >&2; }
err_exit() {
err "$@"
epcim / ipxe_with_dhcp.txt
Created April 13, 2023 08:33 — forked from tuxfight3r/ipxe_with_dhcp.txt
ipxe kickstart over http - dhcp and static configuration
View ipxe_with_dhcp.txt
#clone the repo
git clone
cd ipxe/src
cat >ubuntu-amd64-installer.ipxe <<EOF
echo Starting Ubuntu x64 installer for ${hostname}
set base-url
kernel ${base-url}/linux
epcim /
Created March 17, 2023 13:39 — forked from layoaster/
Cheat sheet/ getting-started guide to pass

pass cheat sheet/guide

Getting started guide to the unix password manager pass. Manage gpg encripted passwords (files) in a standar directory-like hierarchy. Such files can be copied or stored in a git repository.


  1. Install [pass][pass-homepage] (standard unix password manager):


$ sudo apt-get install pass





  • File :GoRun %
  • Package :GoRun
  • Debug :GoDebugStart
epcim / QR-Code-Example
Created June 15, 2022 14:12 — forked from BPScott/QR-Code-Example
QR Code generation and instant preview from the command line
View QR-Code-Example
# Generating throwaway QR codes from the command line for shunting URLS to mobile devices
brew install qrencode
qrencode -o - | open -f -a preview
epcim /
Created May 18, 2022 17:48 — forked from bakman2/
Octoprint IP Camera

How to use Octoprint with an IP camera that has an RTSP stream available

Optional: For Wyze cam only

Install Dafang Hacks on the Wyze Cam.

Once running and all is functional, continue. Set video bitrate to 1500, VBR, 30fps.


View byobu_cheatsheet
Byobu is a suite of enhancements to tmux, as a command line
tool providing live system status, dynamic window management,
and some convenient keybindings:
F1 * Used by X11 *
Shift-F1 Display this help
F2 Create a new window
Shift-F2 Create a horizontal split
Ctrl-F2 Create a vertical split
Ctrl-Shift-F2 Create a new session
epcim / gist:25c1f390ae45b5151cda8137ce9f5a22
Created December 16, 2021 11:51 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan
View gist:25c1f390ae45b5151cda8137ce9f5a22

OS X Preferences

most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
epcim /
Created December 28, 2020 08:07 — forked from mattratleph/
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)