As the title says, what have you learned this week and would like to share with others? It could be a whole framework, some cool trick, best practice... whatever comes to your mind and is related to your profession.
For beginners, this could be a good place to get some quick tips and tricks on topics you're currently learning. This could also serve as a motivation to learn more and inspire.
I always try to work on a project or learn something new every week. And this week, one of the things I've learned the shorthand syntax for <Fragment></Fragment>
in React is <></>
.
Top comments (4)
I found a cool trick using 7zip, to extract a file from an archive, and output it to a custom filename.
I do data processing, and for one particular client, there are multiple file layouts, but basically get named either templatea.txt or templateb.txt. The data comes in as a gzipped file with a very long name. I unzip the file and rename it to either templatea.txt or templateb.txt. I decided to see if I could extract the file and rename it in one step. The first google result, superuser.com/questions/558396/aut... , gave me the answer I was looking for.
For my case, at least, the command ends up being:
7z e *.gz -so > templatea.txt
The 'e' is for extract, '-so' indicates that it should be redirected to standard out, and then I redirect it with '> templatea.txt' into the appropriate file name.
I will probably make this a batch script for now, as I have several small batch scripts like this.
I've started learning React Hooks today. In the beginning of the week started NodeJs. And doin side project
Hooks are awesome! I've been working with them for the past month or so and I've really enjoyed working with them so far. I'll be posting a step-by-step tutorial about building custom hooks next week, so feel free to keep an eye out for it.
I'll love it, because I'm trying to build custom hooks. Waitin 4 it)