byobu, tmux and screeen

byobu shortcuts

  • F2 – Create a new window
  • F3 – Move to the previous window
  • F4 – Move to the next window
  • F6 – Detach from the session and logout
  • F7 – Enter scrollback/search mode
  • F8 – Rename the current window
  • Alt-Pageup – Scroll back through this window’s history
  • Alt-Pagedown – Scroll forward through this window’s history

send message (command-prompt)

$ tmux command-prompt -p "Done!" 

scroll with mouse

screen

Add termcapinfo xterm* 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007:ti@:te@' to your ~/.screenrc

iTerm2

Go to Preferences… -> Profiles -> Treminal and check the following checkboxes:

  • Save lines to scrollback when an app status bar is present. Do it if your screen has a status.
  • Save lines to scrollback in alternate screen mode

exiftool Cheatsheet

Find all photos without date information

$ exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

Set last created and modified to a specific date

$ find . -name "*.jpg" | while read filename;
exiftool "-AllDates=1986:11:05 12:00:00" "$filename";
done

Copy of the originals will be created. Remove *.jpg_original if everything went fine or add -overwrite_original parameter.

Timeshift

by one year

$ exiftool "-AllDates+=1:0:0 00:00:00" .

Rename your files to contain the date and time

they will be suffixed tith -N if they have the same date and time

$ exiftool '-FileName<DateTimeOriginal' -d "%Y%m%d_%H%M%S%%-c.%%e" *.jpg
$ exiftool '-FileName<DateTimeOriginal' -d "%Y-%m-%d %H.%M.%S%%-c.%%e" *.jpg

Copy your photos in a folder structure organised by datetime

exiftool '-Directory<CreateDate' -d ~/Dropbox/Photos/%y/%y%m -r .

ReplayGain your music using mp3gain

ReplayGain is the name of a technique invented to achieve the same perceived playback loudness of audio files. Read more on Hydrogenaudio.

Set all files to 92db – this is the most used loudness now-a-days (it’s recommended also in Serato DJ software and most streaming platforms seems to use same value). You might want to use 89db if you are listening on a Hi-Fi system – in this case just ignore the -d 3 option.

The suggested loudness is ~89, so we add 3.

mp3gain -d 3 -c -p -r *.mp3

or

mp3gain -s r -d 3 -c -p -r *.mp3

-s r this will ignore the replaygain information already stored in the file

-c will ignore clipping warning, use -k to lower the gain to not clip

-p preserve original timestamp of files

-r gain per track (as opposed to per album), it’s good for collections, best of, etc.

Plain text messages in Apple Mail

I am a fan of plain text, so I prefer using plain text mails whenever possible. Here is how you do it for Apple Mail ( OS X El Capitan, but probably works on most versions).

Change the (default) format  for all messages:

  • go to Mail > Preferences, click Composing, then choose Plain Text as Message Format.

Change format of the current message:

  • go to Format > Make Rich Text > Make Plain Text

Reply to messages in the same format you received them:

  • go to Mail > Preferences, click Composing, then select Use the same message format as the original message

Most probably you will also want to use fixed-width font for plain text messages. So, go to Mail > Preferences > Fonts & Colors and choose Use fixed-width font for plain text messages