It's that time of the week again.
So wonderful devs, what did you learn this week? It could be programming tips, career advice etc.
Feel free to comment with what you learnt and/or reference your TIL post to give it some more exposure.
#todayilearned
Summarize a concept that is new to you.
And remember, if something you learnt was a big win for you, then you know where to drop it as well.👇👇🏻👇🏼👇🏽👇🏾👇🏿
Top comments (45)
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 likegit 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
Awesome!
Realised that DE-NO is NO-DE reversed. Changed my life.
Did you mean :p
I learned about linters and started setting up ESLint for one of my repos.
Nice!
Great week for me! I set up pre commit hooks for linting and running tests for staged files, set up a Jenkins pipeline, and got docker compose running for my services. I want to write my first post/guide on one of them later this week
I learn how to add forms to an observable notebook (it's like a coding playground) and modify their behavior. I used them to make interactive examples in here: Using the Maybe type in js
This was last week but I'm still proud I figure out how to do it.
Nice!
this week i learned how to block ip addresses in wordpress and implmented it on my site as well. It is an important security aspect which site owners sideline. Was required from security aspect on our blog .have also come up with a post here dev.to/celyn_davis/how-to-block-ip...
Nice!
I made a visualisation of the clustering algo ${ baby-oopsy-daisy.github.io/sketche...
Give this a look, and the most important, you feedback
(Doesn't work in firefox mobile, if you know the reason please enlighten me)
✌️🧐
actions/cache@v2
GitHub actions cache. My gatsby site now builds in about half the time, much of which is now installing node_modules and deploy.
REGEX
I got comfortable enough with a few regex commands to use it to filter data catalogs.
🔎 How to find datasets in your kedro catalog
Waylon Walker ・ Jun 25 ・ 5 min read
GitHub actions cache be like
I finally learned how to use docker for local development. I always pushed this aside until I needed to use postresql which is a pain to setup locally on a linux environment. So I learned how to use
WSL + Docker + Docker compose
Local development has hit a whole new level for me
Nice!
I learned how to use bookmarks and Mark All/find feature in Notepad++ to select lines that contains/not contains some string in a huge log file.
winhelponline.com/blog/remove-line...
Then, I remembered I could have used grep utility instead :-)