DEV Community 👩‍💻👨‍💻

Adrian Bece
Adrian Bece

Posted on • Updated on

What have you learned this week?

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)

Collapse
hwolfe71 profile image
Herb Wolfe

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.

Collapse
joeberetta profile image
Joe Beretta

I've started learning React Hooks today. In the beginning of the week started NodeJs. And doin side project

Collapse
adrianbdesigns profile image
Adrian Bece Author

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.

Collapse
joeberetta profile image
Joe Beretta

I'll love it, because I'm trying to build custom hooks. Waitin 4 it)

🌚 Friends don't let friends browse without dark mode.

Sorry, it's true.