Skip to content

Instantly share code, notes, and snippets.

@victorboissiere
victorboissiere / vs.zsh
Created April 3, 2018 19:21
[MEDIUM] vs with autocomplete
function vs()
{
RESULTS=`find . -type f -not -path '*/\.*' -not -path '*/vendor/*' -not -path '*/packages/*' -ipath "*$1*"`
red() { echo -e "\033[00;31m$1\033[0m"; }
NB_FILES=$(echo $RESULTS | wc -w)
if [ $NB_FILES -eq "1" ]; then
$EDITOR $(echo "$RESULTS" | head -n1 | cut -d " " -f1)
elif [ $NB_FILES -eq "0" ]; then
>&2 red "No matching file"
else
@artizirk
artizirk / gnupg_scdaemon.md
Last active May 16, 2024 05:21
OpenPGP SSH access with Yubikey and GnuPG

NB: This document describles a 'Old-School' way of using Yubikey with SSH

Modern OpenSSH has native support for FIDO Authentication. Its much simpler and should also be more stable with less moving parts. OpenSSH also now has support for signing arbitary files witch can be used as replacement of gnupg. Git also supports signing commits/tags with ssh keys.

Pros of FIDO

  • Simpler stack / less moving parts
  • Works directly with ssh, ssh-add and ssh-keygen on most computers
  • Simpler
  • Private key can never leave the FIDO device

Cons of FIDO