<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Memos - lmlab.net</title>
    <link>https://lmlab.net/memos.html</link>
    <description>Memo posts from lmlab.net</description>
    <language>ja</language>
    <atom:link href="https://lmlab.net/memos.xml" rel="self" type="application/rss+xml" />
    

    <item>
      <title>Detect encoding</title>
      <link>https://lmlab.net/posts/2026/2026-03-10-detect-encoding.html</link>
      <guid>https://lmlab.net/posts/2026/2026-03-10-detect-encoding.html</guid>
      <pubDate>Tue, 10 Mar 2026 00:00:00 +0900</pubDate>
      <description><![CDATA[Here&#39;s a sample code to detect encoding of a CSV file in Ruby. It tries several encodings and checks if it can read the file without errors. If it finds a valid encoding, it prints it out; otherwise, it reports an error.
```
encodings = [&#39;Win]]></description>
      
      <category>ruby</category>
      
      
    </item>

    <item>
      <title>ICカードリーダーを使う</title>
      <link>https://lmlab.net/posts/2026/2026-03-05-pcsc_scan.html</link>
      <guid>https://lmlab.net/posts/2026/2026-03-05-pcsc_scan.html</guid>
      <pubDate>Thu, 05 Mar 2026 00:00:00 +0900</pubDate>
      <description><![CDATA[NFC（非接触型IC）を試すつもりで、間違って（接触型の）ICカードリーダーを買ってしまいました。。

$ lsusb
:
Bus 001 Device 002: ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader
:

せっかくなので、LinuxでICカードリーダーを使う方法のメモです。これはこれで使える場面がある…のかな？（今のところ思いつきませんが）

sudo apt install pcscd pcsc-tools libpcs]]></description>
      
      <category>linux</category>
      
      
    </item>

    <item>
      <title>Pokemonをゲットするスクリプト(PokeAPI使用)</title>
      <link>https://lmlab.net/posts/2026/2026-02-26-pokemon-getter.html</link>
      <guid>https://lmlab.net/posts/2026/2026-02-26-pokemon-getter.html</guid>
      <pubDate>Thu, 26 Feb 2026 00:00:00 +0900</pubDate>
      <description><![CDATA[とある投稿 (https://x.com/sozoraemon/status/1875847808651350218?s=20)で、PokeAPI (https://pokeapi.co/docs/v2)というサービスを知りました。ライブラリも色々出てはいるようなのですが、シンプルなAPIなので、Rubyの標準ライブラリだけでランダムなポケモンの情報を取得してみました。日本語名を得るためのJSONの掘り下げは複雑ですが、こういうのはAI(今回はGemini使用)が得意ですね。
実行すると、ランダ]]></description>
      
      <category>ruby</category>
      
      
      <enclosure url="https://lmlab.net/posts/2026/2026-02-26-pokemon.png" type="image/jpeg" length="0"/>
      
    </item>

    <item>
      <title>PDF問題</title>
      <link>https://lmlab.net/posts/2026/2026-02-16-pdf-reader-problem.html</link>
      <guid>https://lmlab.net/posts/2026/2026-02-16-pdf-reader-problem.html</guid>
      <pubDate>Mon, 16 Feb 2026 00:00:00 +0900</pubDate>
      <description><![CDATA[画像は確定申告の手続きを進めていて、出会った注意書きです。つい「お前もか！」と思ってしまったので、記録のためこちらに残しています。うちに届くPDF関連のトラブルのほぼ100%はAdobeのAcrobat Readerを使ってる方からです（参考:Prawnで生成したPDFをAcrobatReaderで読めない問題 (https://lmlab.net/posts/2025/2025-09-30-embedding-font-with-prawn.html)）。
ブラウザやOSが提供する機能で、ほと]]></description>
      
      
      <enclosure url="https://lmlab.net/posts/2026/2026-02-16-do-not-use-acrobat-reader.png" type="image/jpeg" length="0"/>
      
    </item>

    <item>
      <title>Suppress locale warnings when ssh from Mac to Linux</title>
      <link>https://lmlab.net/posts/2026/2026-01-10-suppress-locale-warnings.html</link>
      <guid>https://lmlab.net/posts/2026/2026-01-10-suppress-locale-warnings.html</guid>
      <pubDate>Sat, 10 Jan 2026 00:00:00 +0900</pubDate>
      <description><![CDATA[今更感に溢れたエントリーですが、MacからsshでLinuxサーバーに接続した際に出るロケール警告を抑制する方法のメモです。

-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or ]]></description>
      
      <category>linux</category>
      
      <category>mac</category>
      
      
    </item>

    <item>
      <title>minitest エラー？</title>
      <link>https://lmlab.net/posts/2026/2026-01-09-minitest-errors.html</link>
      <guid>https://lmlab.net/posts/2026/2026-01-09-minitest-errors.html</guid>
      <pubDate>Fri, 09 Jan 2026 00:00:00 +0900</pubDate>
      <description><![CDATA[先日から、複数のプロジェクトで突然、rails test が動かなくなったり、起動前にエラー(下記)が出るようになりました。
参考: https://www.techtips.page/ja/topics/883
```
/Users/username/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/railties-8.0.4/lib/rails/testunit/linefiltering.rb:7:in &#39;run&#39;: wrong]]></description>
      
      <category>rails</category>
      
      <category>ruby</category>
      
      
    </item>

    <item>
      <title>Gemini APIを使ってみた</title>
      <link>https://lmlab.net/posts/2026/2026-01-08-gemini-api.html</link>
      <guid>https://lmlab.net/posts/2026/2026-01-08-gemini-api.html</guid>
      <pubDate>Thu, 08 Jan 2026 00:00:00 +0900</pubDate>
      <description><![CDATA[GoogleのGemini APIを使ってみました。ChatGPT APIと似た感じ (/posts/2023/2023-12-27-chatgpt-api.html)でHTTP経由でリクエストを送ります。
```ruby
require &#39;net/http&#39;
require &#39;json&#39;
url = URI(&quot;https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash]]></description>
      
      <category>ai</category>
      
      <category>ruby</category>
      
      
    </item>

    <item>
      <title>How to send messages to Google Chat using Webhook in Ruby</title>
      <link>https://lmlab.net/posts/2026/2026-01-05-use-google-chat-webhook.html</link>
      <guid>https://lmlab.net/posts/2026/2026-01-05-use-google-chat-webhook.html</guid>
      <pubDate>Mon, 05 Jan 2026 00:00:00 +0900</pubDate>
      <description><![CDATA[Google ChatのWebhookを使って、Rubyからメッセージを送信する関数の実装例です。
```
require &#39;net/http&#39;
require &#39;uri&#39;
require &#39;json&#39;
def sendgooglechat(webhookurl, message)
  uri = URI.parse(webhookurl)
  # リクエストの設定
  http = Net::HTTP.new(uri.host, uri.port]]></description>
      
      <category>ruby</category>
      
      
    </item>

    <item>
      <title>Wifi checker for RaspberryPi Pico W</title>
      <link>https://lmlab.net/posts/2025/2025-12-24-wifi-checker-for-pico-w.html</link>
      <guid>https://lmlab.net/posts/2025/2025-12-24-wifi-checker-for-pico-w.html</guid>
      <pubDate>Wed, 24 Dec 2025 00:00:00 +0900</pubDate>
      <description><![CDATA[Wifi経由で命令を送り操作ができるバージョンを開発中…なのですが、(PicoWの)起動後になかなか繋がらなかったり、途中で接続が切れてしまうケースが多発してしまっています。そこで作ってもらったのが、以下のスクリプト。
```
Raspberry Pi Pico WiFi Stability Checker
import time
import network
from machine import Pin
WiFi Configuration
WIFISSID = YOURSSID
WIFIP]]></description>
      
      <category>python</category>
      
      
    </item>

    <item>
      <title>SSLError on Ruby on Homebrew</title>
      <link>https://lmlab.net/posts/2025/2025-12-21-sslerror-on-ruby-on-homebrew.html</link>
      <guid>https://lmlab.net/posts/2025/2025-12-21-sslerror-on-ruby-on-homebrew.html</guid>
      <pubDate>Sun, 21 Dec 2025 00:00:00 +0900</pubDate>
      <description><![CDATA[以下のコードをHomebrew(のrbenv経由)でインストールしたRubyで実行すると、SSLのエラーが発生します。
```
require &#39;uri&#39;
require &#39;net/http&#39;
uri = URI(&quot;https://ruby-lang.org/&quot;)
res = Net::HTTP.get_response(uri)
```
実行結果:

/Users/username/.rbenv/versions/3.4.7/lib/ruby]]></description>
      
      <category>ruby</category>
      
      
    </item>

    <item>
      <title>Disable Terminal suggestion on VSCode</title>
      <link>https://lmlab.net/posts/2025/2025-12-21-disable-terminal-suggestion.html</link>
      <guid>https://lmlab.net/posts/2025/2025-12-21-disable-terminal-suggestion.html</guid>
      <pubDate>Sun, 21 Dec 2025 00:00:00 +0900</pubDate>
      <description><![CDATA[VSCodeのターミナルでコマンドを入力していると、大量のサジェストが出てきて邪魔になることがあります。これを無効化する方法です。個人的にはbashやzshの補完で十分です(^^;
Cmd+, で設定を開く
「terminal suggest」で検索
Terminal Integrated: Suggest Enabled をオフ
]]></description>
      
      
    </item>

    <item>
      <title>SolidQueue as Linux daemon</title>
      <link>https://lmlab.net/posts/2025/2025-12-09-solid-queue-as-daemon.html</link>
      <guid>https://lmlab.net/posts/2025/2025-12-09-solid-queue-as-daemon.html</guid>
      <pubDate>Tue, 09 Dec 2025 00:00:00 +0900</pubDate>
      <description><![CDATA[Here&#39;s an example of systemd setting for launching SolidQueue for production enviroment.
```
[Unit]
Description=Solid Queue
After=network.target
[Service]
Type=simple
User=lmuser
WorkingDirectory=/var/www/myapp/current
Environment=&quot;RAILS_ENV]]></description>
      
      
    </item>

    <item>
      <title>RaspberryPi Pico Wを使ってみた(mac編)</title>
      <link>https://lmlab.net/posts/2025/2025-12-05-trying-raspi-pico-w.html</link>
      <guid>https://lmlab.net/posts/2025/2025-12-05-trying-raspi-pico-w.html</guid>
      <pubDate>Fri, 05 Dec 2025 00:00:00 +0900</pubDate>
      <description><![CDATA[RaspberryPi Pico(W)の開発をThonny+MicroPythonで頑張ってましたが、やはり(Copilotを入れてて使い慣れた)MacBookからも扱えるようにしようと思って、ちょっと路線変更(寄り道)をしてみました。昔みたいにドライバを追加で入れたりせずにUSBケーブルを繋ぎさえすれば見えるようなので、せっかくだからRubyでしょ！とPicoRuby (https://picoruby.org/)のuf2を探してきて入れてみましたが、うまくいかず（下記URLと全く同じ状況、p]]></description>
      
      <category>raspi-pico</category>
      
      <category>python</category>
      
      <category>電子工作</category>
      
      
    </item>

    <item>
      <title>RaspberryPi 5でステッピングモーター制御</title>
      <link>https://lmlab.net/posts/2025/2025-11-22-raspi-step-motor.html</link>
      <guid>https://lmlab.net/posts/2025/2025-11-22-raspi-step-motor.html</guid>
      <pubDate>Sat, 22 Nov 2025 00:00:00 +0900</pubDate>
      <description><![CDATA[RaspberryPiのGPIOを使って、ステッピングモータ(28BYJ-48)を制御するサンプルプログラムです。
以下の記事を参考に作成していますが、RaspberryPi5ではpigpioが使えない(はず?)ので、それに頼らないように書き換えています。
https://zenn.dev/kotaproj/articles/646718b59b15a68913b9
```
import time
from gpiozero import OutputDevice
PIN settings
PI]]></description>
      
      <category>raspi</category>
      
      
    </item>

    <item>
      <title>Find wifi password on raspberrypi</title>
      <link>https://lmlab.net/posts/2025/2025-11-06-find-wifi-password-on-raspberrypi.html</link>
      <guid>https://lmlab.net/posts/2025/2025-11-06-find-wifi-password-on-raspberrypi.html</guid>
      <pubDate>Thu, 06 Nov 2025 00:00:00 +0900</pubDate>
      <description><![CDATA[You can find any Wifi settings in the following directory(not in /etc/wpa_supplicant anymore).

ls /etc/NetworkManager/system-connections/

https://qiita.com/ST_TzF/items/fce9f67c4afa3a8b4f0b
]]></description>
      
      
    </item>

    <item>
      <title>How to install Raspberry Pi Connect Lite</title>
      <link>https://lmlab.net/posts/2025/2025-10-17-rpi-connect-lite.html</link>
      <guid>https://lmlab.net/posts/2025/2025-10-17-rpi-connect-lite.html</guid>
      <pubDate>Fri, 17 Oct 2025 00:00:00 +0900</pubDate>
      <description><![CDATA[Raspberry Pi connect is also available for Rasiberry Pi OS Lite..!

sudo apt install rpi-connect-lite
loginctl enable-linger
rpi-connect on
rpi-connect signin  # Copy the URL and login using a browser.

https://www.raspberrypi.com/documentation/servi]]></description>
      
      
    </item>

    <item>
      <title>eTaxの罠？</title>
      <link>https://lmlab.net/posts/2025/2025-10-09-traps-on-etax.html</link>
      <guid>https://lmlab.net/posts/2025/2025-10-09-traps-on-etax.html</guid>
      <pubDate>Thu, 09 Oct 2025 00:00:00 +0900</pubDate>
      <description><![CDATA[（いずれ再チャレンジしますが、期日に間に合いそうになく一旦窓口納付となってしまったので備忘として残します）
個人の確定申告は数年前からウェブで完結する方法でやれているので、法人もそろそろ…と思って税理士の先生から情報を頂いてeTax (https://www.e-tax.nta.go.jp/)を使い始めてみたのですが…。
まずはブラウザの拡張をするため？のアプリのインストーラが文字化けしてて、何を入れさせられているのかドキドキするところから始まります(^^;
etax-app /posts/20]]></description>
      
      
    </item>

    <item>
      <title>Prawnで生成したPDFをAcrobatReaderで読めない問題</title>
      <link>https://lmlab.net/posts/2025/2025-09-30-embedding-font-with-prawn.html</link>
      <guid>https://lmlab.net/posts/2025/2025-09-30-embedding-font-with-prawn.html</guid>
      <pubDate>Tue, 30 Sep 2025 00:00:00 +0900</pubDate>
      <description><![CDATA[タイトルの通りなんですが、Rubyのprawnというライブラリで生成したPDFをAcrobatReaderで開くと以下のようなエラーに遭遇します。
Cannot extract the embedded font &#39;9279db+IPAexMincho&#39;. Some characters may not display or print correctly.
ChromeやSafariなどのブラウザ、macOSのプレビューなどでは普通に問題なく動くので、Acrobatを使わなけれ]]></description>
      
      <category>ruby</category>
      
      <category>prawn</category>
      
      
    </item>

    <item>
      <title>How to install ftp command with homebrew</title>
      <link>https://lmlab.net/posts/2025/2025-09-12-how-to-install-ftp-command-with-homebrew.html</link>
      <guid>https://lmlab.net/posts/2025/2025-09-12-how-to-install-ftp-command-with-homebrew.html</guid>
      <pubDate>Fri, 12 Sep 2025 00:00:00 +0900</pubDate>
      <description><![CDATA[inetutlis contains ftp command!

brew install inetutils

There are some alternatives of FTP command. Like lftp, tnftp.
]]></description>
      
      <category>homebrew</category>
      
      <category>linux</category>
      
      
    </item>

    <item>
      <title>RaspberryPi Pico Wを使ってみた(Thonny編)</title>
      <link>https://lmlab.net/posts/2025/2025-08-28-raspi-pico-with-micro-python.html</link>
      <guid>https://lmlab.net/posts/2025/2025-08-28-raspi-pico-with-micro-python.html</guid>
      <pubDate>Thu, 28 Aug 2025 00:00:00 +0900</pubDate>
      <description><![CDATA[以前チラッと試用 (https://lmlab.net/posts/2025/2025-06-21-led-for-raspi-pico-w.html)しましたが、RaspberryPiにプリインストールされているThonny + MicroPython環境を使うと、めちゃくちゃ簡単にRaspberryPi Picoの開発ができます。
LEDを点滅させる: pico-led.py
```
from machine import Pin, Timer
led = Pin(&quot;LED&quo]]></description>
      
      <category>raspi</category>
      
      <category>raspi-pico</category>
      
      <category>python</category>
      
      <category>電子工作</category>
      
      
    </item>

  </channel>
</rss>
