Masatoshi Nishiguchi's Blog

HomeBadges

CSS adding margin to all children

Feb 14, 20211 min read

Sometime I want to add margin to all children in case that they get stacked on mobile devices. It would be nice if I have a utility CSS that does the job and can be applied to a parent element. .children-mb-1 > * { margin-bottom: 0.25rem !importan...

Phoenix 1.5 Page Title

Feb 12, 20212 min read

I made a custom application_title_tag view helper function because I did not like Phoenix's default behavior of the page title. I want it to be: "Hello · Masatoshi Nishiguchi" when the title is "Hello" "Masatoshi Nishiguchi" (default title) when the...

Identifying ports already in use

Feb 9, 20211 min read

$ lsof -i -n -P | grep TCP | grep 4000 beam.smp 28569 mnishiguchi 49u IPv4 0x4d3d8b73de14af89 0t0 TCP *:4000 (LISTEN) $ kill -9 28569 Resources Identifying ports in use on Mac and Windows Operating Systems

Adding Bootstrap 4 and Purge CSS to Phoenix 1.5

Feb 9, 20214 min read

I hear Tailwind is popular now, but I personally do not see any benefit. It just adds extra complexity. First I tried to get used to it but I feel a lot more productive using Bootstrap and I like simple Bootstrap styles better. So I decided to stick ...

[Elixir Nerves] Temperature Humidity Sensors

Jan 27, 20215 min read

Learning electronics through Elixir and the Nerves IoT framework is so much fun. I enjoy keeping my study notes whenever I learn something particularly about Elixir/Nerves-related things. Today, I want to play with temperature and humidity sensors. T...

[Elixir Nerves] Smoothly dimming LEDs using a servo driver

Jan 26, 20217 min read

It is so pleasant to do the IoT programming in Elixir thanks to the Nerves IoT platform. Elixir allows us to write beautiful, fluent and readable code for problems that would look scary in other languages. This is another random study note about my ...

© 2021 Masatoshi Nishiguchi's Blog

PrivacyTerms
Proudly part of