DEV Community

Discussion on: June 26th, 2020: What did you learn this week?

Collapse
 
nksprzak profile image
Nick Kasprzak

A lot of terminal stuff it seems.

I learned that instead of using > you can use >> to concat an output to a file.

For grep I learned a bunch of options like -v (ignore case), -A (lines after), -B (lines before), -o (get just the specific searched string) and this cool one -Eo '.{0,20}a href.{0,70}' to get the amount of chars before and after an occurrence of a string, 'a href' in that case.

Learned of a type of program called terminal notifier, which notifies you when a long task like compiling finally finishes. Though I couldn't figure out how to get that to work w/ my server I SSH into.

Learned about Insomnia, alternative to Postman.

This git command, git diff -U0 HEAD~1 , which will just show you the difference and no lines before like git diff usually does. Helpful for when I pipe for a change like git diff -U0 HEAD~1 | grep crm to see if I missed a search and replace.

Lastly how to find the top 5 directories , du -hs * | sort -rh | head -5. This helped me when my VM that I use for my staging Cassandra instance got full and nothing could connect anymore. I learned where Cassandra keeps the data on the disk, /var/lib/cassandra/data

Collapse
 
nickytonline profile image
Nick Taylor

Awesome!

Hackerman from Kung Fury putting on a Nintendo Power glove