Skip to content

Instantly share code, notes, and snippets.

View Zwyx's full-sized avatar

Zwyx Zwyx

View GitHub Profile
@Zwyx
Zwyx / encrypt.sh
Last active April 28, 2024 17:01
Display detailed information about a password store and reencrypt it
#!/bin/bash
# Created by github.com/Zwyx
# MIT Licence
if [ "$1" == "--help" ] || [ "$1" == "-h" ]; then
echo "Usage: ./encrypt.sh [subfolder-name]..."
exit
fi
@Zwyx
Zwyx / passpro-to-add-in.zshrc
Last active June 27, 2021 09:50
Create the `passpro` command for `pass`
passpro() {
# Set a different password store directory,
# then run `pass` with all the arguments received by `passpro`
PASSWORD_STORE_DIR=~/.password-store-pro pass $@
}
_passpro() {
# Same idea for the completer
PASSWORD_STORE_DIR=~/.password-store-pro _pass
}
@Zwyx
Zwyx / pass-p-to-add-in.zshrc
Last active June 27, 2021 09:49
Create the `p` command for `pass`
p() {
# Insert the password into the X selection
# (also called primary, see `man xclip`)
pass $1 | head -n 1 | tr -d "\n" | xclip
# Countdown
for i in {5..1}; do
printf "\r$i"
sleep 1
done
@Zwyx
Zwyx / App.css
Last active October 5, 2019 02:49
react-nfc
.nfc {
height: 100vh;
width: 100vw;
background-color: #21252b;
color: #abb2bf;
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
}
@Zwyx
Zwyx / App.tsx
Last active January 29, 2021 17:47
react-nfc
import React from "react";
import "./App.css";
/** Type for the possible steps of the app */
type TStep =
| "initializing"
| "noNfc"
| "nfcNotEnabled"
| "waitingForNfcEnabled"
| "waitingForTag"