Weeknotes 38
20th March, 2022
“Tips, tips, tips”
-
I learnt of the
<dialog>
element this week via Kevin Powell. A native modal with associated JavaScript API – very cool!While it isn’t fully supported yet, we’re getting very close to the dialog element being in all modern browsers!
This is great, but there’s a part of me that can’t quite believe that this is only a thing that we can maybe, possibly, start using in 2022. How long have we needed modals? The Web moves both too slowly and too quickly at once.
-
Sebastien Auriault with a useful tip about Rails template variants. I had no idea this feature existed – I keep discovering new Rails features despite having used the framework for 10+ years at this point – and it looks useful in circumstances where you definitely need separate templates.
-
I believe that a team should try and communicate “in public” as much as possible because it has a lot of benefits. Information can be picked up by the team organically reducing knowledge silos. People can chip-in and help out if the someone else is not available. Etc, etc.
It’s so hard to stop myself slipping back into communicating over DMs though…
-
Simon Willison is constantly finding new and interesting ways to use GitHub Actions. He recently created a new tool called
shot-scraper
for screen scraping that uses Playwright under the hood, and has now combined that with a new GitHub repo template that makes setting up automated screen scraping easy.His Twitter and website are well worth following.
-
TJ DeVries continues to release great videos on the latest and greatest in Neovim. This time 2 minutes on a brand new feature: Global Statusline. Looks pretty neat. You see a lot of Redditers moaning about people posting video-only content, many preferring written descriptions, but I find video summaries like this extremely helpful. Bravo, TJ!
-
Nice tip from @hauleth on making “lockfiles” such as
Gemfile.lock
,mix.lock
,package-lock.json
, andyarn.lock
less of a hassle to merge by setting themerge=binary
attribute against those file types in~/.config/git/attributes
.It will force Git to treat lock file as a binary file, which mean that it will not modify the file with conflict markers while still marking file as a conflict in stage. Then you can “resolve conflicts” via mix deps.get/mix deps.update
-
TIL: You can reset the commit date of an existing commit using
git commit --amend --date=now
. If you made some work-in-progress commits over time, but you want to bring the dates up-to-date after a rebase this is useful.