This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SECRET_NAME=id_rsa | |
SECRET_PATH=~/.ssh/id_rsa | |
# store the secret content as an item in bitwarden | |
echo "{\"organizationId\":null,\"folderId\":null,\"type\":2,\"name\":\"${SECRET_NAME}\",\"notes\":\"$(base64 -w 0 ${SECRET_PATH})\",\"favorite\":false,\"fields\":[],\"login\":null,\"secureNote\":{\"type\":0},\"card\":null,\"identity\":null}" | bw encode | bw create item | |
bw sync # optional | |
# retrieve the secret | |
# assuming a single search result | |
bw list items --search id_rsa | jq -r '.[0].notes' | base64 -d > ${SECRET_PATH} | |
# in case you're using chezmoi here's a template that will retrieve that secret automatically | |
#$cat $(chezmoi source-path ${SECRET_PATH}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Inspired by https://gist.github.com/kyranjamie/646386d5edc174e8b549111572897f81 | |
export enum Country { | |
AF = 'Afghanistan', | |
AX = 'AlandIslands', | |
AL = 'Albania', | |
DZ = 'Algeria', | |
AS = 'American Samoa', | |
AD = 'Andorra', | |
AO = 'Angola', | |
AI = 'Anguilla', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ name: 'slugify' }) | |
export class SlugifyPipe implements PipeTransform { | |
transform(input: string): string { | |
const trChars = { | |
'áÁ': 'a', | |
'éÉ': 'e', | |
'íÍ': 'i', | |
'óÓ': 'o', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa | |
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa | |
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa |