Skip to content

Instantly share code, notes, and snippets.

View letrome's full-sized avatar
✌️

Romain Letourneur letrome

✌️
View GitHub Profile
#! /bin/zsh
default_browser="arc"
install_list="wget git fortune cowthink vim shpotify newman docker docker-compose duti defaultbrowser"
install_cask_list="arc google-chrome notion 1password 1password-cli viscosity postman github iterm2 slack deepl visual-studio-code linear-linear spotify whatsapp sublime-text jetbrains-toolbox the-unarchiver vnc-viewer vlc"
plugins_ohmyzsh="git 1password aliases chucknorris codeclimate colored-man-pages colorize command-not-found docker docker-compose encode64 extract jsontools sublime themes vscode web-search"
encrypted_spotify_creds="#encrypted-spotify-creds"
vlc_association="mp3 avi asf wmv wma mp4 mov 3gp ogg ogm wav flac midi"
fleet_association="txt json xml java py sh log scala sc php gitignore md"
@letrome
letrome / nonce-generator.go
Created March 27, 2024 13:31
A simple go script that takes a label in input, associates this label to a nonce and append it to a file.
func appendNonceToFile(label, nonce, filename string) error {
file, err := os.OpenFile(filename, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {
return err
}
defer func() {
if cerr := file.Close(); cerr != nil && err == nil {
err = cerr
}
}()