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.
Top comments (29)
I used xargs this week.
It looks like the
open
command can't take data from the standard input, so I ended up using something like this.For those who don't know,
xargs
(with the right arguments) can act like themap
method on javascript arrays. So you can imagine the above doing something like this:xargs
can come in handy in a pinch, but it's usually unnecessary and the way it generates arguments can cause some complications. I can't think of a case wherexargs
would be more appropriate than Command Substitution or awhile read
loop, e.g.:or
With process substitution and the
mapfile
builtin, you can even populate an array and iterate over that:Nice!
When I have
push
ed to my remote from another machine, and made commits but forgot topull
first, I learned that to avoid an ugly and unnecessary merge commit,git pull --rebase
is probably safer than trying to get around it with various combinations ofgit stash
andgit reset
, because it yeeted one of my passwords away by accident :vI also learned how (not) to set up nginx as a reverse-proxy to docker containers and how to use Jekyll
This week I learned about Frontity, a React framework for WordPress. WordPress still serves as the backend and database, but you can make components for the frontend with React. While Frontity isn't going to work for my planned project (I couldn't figure out how to add TailwindCSS into the mix), it's a tool that I'm glad I have played with.
TIL!
I dug into signed exchanges a bit today. I was vaguely familiar before, but it clicked.
crap i didn't learn anything new this week.
No worries friend!
Thanks Nick ;)
😮
(Re)learning some PHP for a side project. It's been a few years and I never really knew PHP well in the first place. Getting reused to the syntax and learning about PHP 8 changes.
Well I just got insight and interested to learn new technology, that is ASP.NET Core 6 rc.2 which will be stable release in November.
This is my first time learn .NET stuff, Do you have any learning resources, suggestion or advice about it? (this is also my first time learn C#)
My past experience in web development is just Laravel and Django
Learned about HSL for color in css. Seems way more intutive than RGB or hex codes and I'm going to incorporate it into my front end design more.
Yeah!
I learned there is a computer out there I can still be excited about. M1 Max MBP 🏎
SvelteKit and Strapi. They're really cool. Gonna start a pet project to get deeper.