@_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)
https://t.co/1Zi72sNvg3(out_of) { _1 < rating ? ?★ : ?☆ }.join
end
star_rating(4, out_of: 5)#=> "★★★★☆"
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
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
@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.
@thejonotron@wesbos@syntaxfm > 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. :-)
If you are doing #AdventOfCode in Elixir do yourself a favour and use the starter graciously provided by @mitchhanberg. And input downloader, test harness and even benchmarks! https://t.co/5fnciWdAeA
#MyElixirStatus
@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).
@TheJMoore Monospaced fonts often look very out of place in interfaces like this. Some quality fonts support tabular numbers, e.g. Inter - https://t.co/wyf5Xk2oak Not sure about Overpass though. Enable in CSS with font-variant-numeric: tabular-nums;