nmk (@nmk) profile picture
Joined January 2007
Photo by nmk (@nmk)Photo by nmk (@nmk)Photo by nmk (@nmk)Photo by nmk (@nmk)Photo by nmk (@nmk)
Replying to @_swanson
We can construct the correct array directly, instead of initializing with empty stars and filling in the correct ones afterwards: def star_rating(rating, out_of: 5) Array.new(out_of) { _1 < rating ? ?★ : ?☆ }.join end star_rating(4, out_of: 5)#=> "★★★★☆"
124
Replying to @src_rip
Also, they are persistent, surviving redeploys. :-)
1
22
Today I learned that you can pass a version-file option to the erlef/setup-beam GitHub action to get the Elixir and OTP version in your pipeline from a file, e.g. a .tool-versions. I previously wrote my own custom pipeline step for this. #myelixirstatus
1
9
3
65
10,774
It has always bothered me that updating dependencies is done with `mix deps.update` and checking for outdated dependencies is done with `mix hex.outdated`. Mix aliases to the rescue. #myelixirstatus
154
An update to my timezones video, now with less round trips. #myelixirstatus youtu.be/fvuT5fqbSm8 Thanks to @nmk for the tip.
3
8
2,323
Replying to @DNAutics
If you need the timezone on all sockets and want to avoid hooks and events, you can also pass the timezone as a socket param (in `new LiveSocket()` and it will be available in all live views in the connect params.
1
1
9
192
Replying to @navinpeiris
I also started seeing this after updating to 1.16.0 and 26.2.1.
1
2
83
> And at the time probably had the best css support out there. No surprise there. Prince was created by the creator of CSS himself - Håkon Wium Lie. :-)
31
Also, my charlist+recursion based solution for day 1 is three times faster than the string one. 🤷‍♂️
1
74
Replying to @HassanShaikley
hexdocs.pm/ecto_dev_logger/r… would be one of those options.
1
16
Replying to @germsvel
There is also `mix test --failed` to run all failing tests from the last run. And `mix test --stale` to run all tests which have changed since the last run (either directly or through module dependencies).
1
3
90
Replying to @DNAutics
This is what I have been using for a few months now and it has worked great.
16
Would you also write a separate User.just_id() type for use in specs?
13
Replying to @_swanson @siaw23
In rails 7.1 in delegates to cover? if the argument is a Range.
19
Replying to @TheJMoore
Monospaced fonts often look very out of place in interfaces like this. Some quality fonts support tabular numbers, e.g. Inter - rsms.me/inter/#features/tnum Not sure about Overpass though. Enable in CSS with font-variant-numeric: tabular-nums;
2
Replying to @TheJMoore
May I suggest using tabular figures for the Load column?
1
1
Replying to @mattoflambda
Selling high-end road bike, lightly used. :-) Now look for Vittorio Brumotti on YouTube.
DMs are open.
Replying to @smdiehl
Less type space travel. Better understanding and improvement of tooling.