Back to <til> Today I learned

How to Generate a Secure Password From Command Line

When installing a new server or just creating an online account is common to need a secure password. You can use a password generator to create a secure password, but you can also use the command line to generate a secure password.

openssl rand -base64 32 | pbcopy

This command will generate a secure password and copy it to your clipboard. You can also use the tr command to remove the new line character.

openssl rand -base64 32 | tr -d '\n' | pbcopy

In case you want to save it to a file, you can use the tee command.

openssl rand -base64 32 | tr -d '\n' | tee -a ~/password.txt

All the commands above will generate a 32 character password. You can change the number to generate a different length password. Also I’m using -base64 to generate a password with letters, numbers and special characters (plus and equal sign). You can use -hex to generate a password with only letters and numbers.

Back to <til> Today I learned

Posts by me

Popular git config options

Yeah, another hightlight from HN. This time Julia Evans (I have her in my syndication list, but saw her post from HN), shared a very interesting list of pupular git config options, source

Recurrency notation RFC-5545

I learn about the From the specification: This document defines the iCalendar data format for representing and exchanging calendaring and scheduling information such as events, to-dos, journal …

Log Search Utility

I found out in HN about logdy which is a web UI for displaying logs from the stdin to a browser, pretty neat. and reading in the comments also learn about lnav pretty cool tool too (three double oo words 😀).