Skip to content

Instantly share code, notes, and snippets.

View obatiuk's full-sized avatar
🇺🇦
#StandWithUkraine

Oleksii Batiuk obatiuk

🇺🇦
#StandWithUkraine
View GitHub Profile
#!/bin/sh
[ -n "$(echo $@ | grep "\-debug")" ] && set -x
date=$(date +%Y-%m-%d-T%H-%M-%S)
host=$(cat /proc/sys/kernel/hostname)
backup_dir="/tmp/${host}-${date}"
mkdir -p ${backup_dir}
@obatiuk
obatiuk / pass.md
Created October 26, 2022 03:43 — forked from abtrout/pass.md
Using password-store with git repository synching

Password-store keeps your passwords (or any other sensitive information) saved in GnuPG encrypted files organized in ~/.password-store. For more information about GPG, consult the GNU Privacy Handbook.

Getting started

To get started, install pass and generate a keypair.

$ brew install pass
$ gpg --gen-key
$ gpg --list-keys
@obatiuk
obatiuk / YubiKey-GPG-SSH-guide.md
Created November 24, 2022 05:47 — forked from ageis/YubiKey-GPG-SSH-guide.md
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate). I've published a Bash function which automates this slightly special key generation process.

import java.util.concurrent.Callable;
public class Unchecked {
public static <T> T unchecked(Callable<T> callable) {
try {
return callable.call();
} catch (Exception ex) {
throw new RuntimeException(ex.getMessage(), ex);
}