Skip to content

Instantly share code, notes, and snippets.

View epcim's full-sized avatar

Petr Michalec epcim

View GitHub Profile
@epcim
epcim / Makefile
Created June 29, 2022 11:59
sops seal/unseal functions
seal-sops: ## SOPS Encrypt all secrets path matching [_sec|secret|config|*.secret*]
@find $(PTH) -path "*/_sec/*" -type f -o -path "*/secret/*" -type f -o -path "*/config/*" -name "*.secret*" -type f |\
egrep -v '(\.enc|\.asc|\.sealed|\.matrix)' |\
while read file; do \
./scripts/seal-sops $$file;\
done;
unseal-sops: ## SOPS Decrypt all secrets (suffix: .enc and .enc.yaml)
@find $(PTH) -name "*.enc" -type f -o -name "*.enc.*" -type f |\
while read file; do \
@epcim
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
# Generating throwaway QR codes from the command line for shunting URLS to mobile devices
brew install qrencode
qrencode -o - http://www.google.com | open -f -a preview
@epcim
epcim / octoprint.md
Created May 18, 2022 17:48 — forked from bakman2/octoprint.md
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.

Installation

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
epcim / osx_vnc.sh
Last active December 21, 2021 08:12
#!/bin/bash
# /System/Library/CoreServices/Screen Sharing.app
# https://ss64.com/osx/kickstart.html
# https://apple.stackexchange.com/questions/30238/how-to-enable-os-x-screen-sharing-vnc-through-ssh
SWITCH=${1:-on}
[[ "$SWITCH" == "on" ]] && {
echo "Enter VNC PASS"
read -s VNCPASS
@epcim
epcim / gist:25c1f390ae45b5151cda8137ce9f5a22
Created December 16, 2021 11:51 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

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
epcim / dummy.json
Last active November 8, 2021 14:59
dummy
{
"foo": {
"bar": {
"baz": "xyz"
}
}
}
@epcim
epcim / kcd.service
Created August 24, 2021 14:50
systemd.service and timer example
[Unit]
Description=KCD cron job
After=vpm.service
After=kubelet.service
[Service]
User=root
Type=oneshot
SyslogIdentifier=kcd
EnvironmentFile=-/etc/environment
@epcim
epcim / 1-OSXCustomizations.md
Last active March 10, 2021 16:45
OSX dotfiles and customizations

Install

pkg manager brew

  • see lists below

OSX shell gnu/linux experience

  • keep your profile shell as "bash"
  • install GNU tools and put them on your PATH first