未分類

この話の続編になります。

This is a sequel to the story.

私は、11:30の特急に乗る予定だったのですが、現在、10:30の列車が動いていません。

これは真面目な話なのですが、都心の電車を使わざるを得ない人は、いつでも、頭の中に、都心部の鉄道路線が頭に思い浮べれるように訓練しておく必要があります。

This is a serious matter, but if you have to use the train in the city center, you must train yourself to visualize the train lines in your mind at any time.

鉄道会社は、電車の中で「事故の発生状況」は教えてくれても、「私(たち)が、どうすれば良いのか」は、教えてくれません。

The railway company will tell you about the “circumstances of the accident” on the train, but they won't tell you “what we should do.”

主要駅までの代替交通手段を教えてくれることもありますが、それ以外について全部を説明しませんし、そんなことできるわけがありません。

Sometimes, they will tell you about alternative transportation to major stations, but they won't explain everything else, and there's no way they could.

では、スマホアプリを使えば良いか、というと、乗り換えアプリは情報の反映が遅い。

However, if you use a smartphone app, the information on the transfer app is slow to update.

その上、代替ルートは有料会員にしか提供しないことが多く、さらに、その代替ルート情報が、最適と言えない場合があります(というか、ほとんど役に立たない)。

What's more, alternative routes are often only provided to paying members. In addition, the alternative route information is not always the best (or, more precisely, it is rarely helpful).

会議の時間が決っている私たちは、数分で代替ルートを自力で決定しなればなりません。その数分を見逃すと、ベストな乗換駅を通過してしまう可能性が高いからです。

As we have a fixed meeting time, we must decide on an alternative route ourselves in a few minutes. If we miss those few minutes, we will likely pass the best transfer station.

先日の出張も、小田急が、午前5時半(始発?)ごろ、小田急小田原線の新宿駅と代々木上原駅の間で信号トラブルが発生し、その状態で運転を強行(?)した結果、正午過ぎまで、新宿到着率0%を続けるという、『どこからつっこめば良いのか分からない』ような事故を起こしています。

The other day, on a business trip, Odakyu Electric Railway had a signal problem between Shinjuku Station and Yoyogi Uehara Station on the Odakyu Odawara Line at around 5:30 in the morning (first train?). As a result of forcing through the operation (?), the arrival rate at Shinjuku Station remained at 0% until past noon, causing an accident that was 'so bad you didn't know where to start.'

この時、私は『新宿に近づくほど、到着時刻が遅くなる』と判断し、最初に他の路線と交差している駅で飛び降りました ―― 結果として、この判断が、私を救いました。

At this point, I decided that the closer I got to Shinjuku, the later I would arrive, so I got off at the first station, where the train crossed another line - and as it turned out, this decision saved me.

ぼんやりと、小田急の復旧を信じて待っていたら、この日の仕事も潰されるところでした。

If I had waited around idly, believing that the Odakyu line would be restored, I would have lost my job for the day.

小田急電鉄さんは、私の大切な交通インフラで生活のパートナーです。

Odakyu Electric Railway is an integral part of my transportation infrastructure and a partner in my life.

小田急が潰れたら、大問題です。小田急が不祥事を起こしても(いや、列車運行に関しては結構なトラブル起こしているんですけどね)、私は耐えるでしょう。でも、フジテレビが潰れようが、私は1mmも構わないです。NHKを含めて別のテレビ局がありますし、フジテレビが、私に特別良いコンテンツを提供しているとは思えないからです(そういう意味では、NHKの救済には走るかもしれない)

If Odakyu goes under, it will be a big problem. Even if Odakyu gets into trouble (well, they do have quite a few issues with their train operations), I'll put up with it. But if Fuji TV goes under, I don't care one bit. There are other TV stations, including NHK, and I don't think Fuji TV provides me with any excellent content (in that sense, I might run to the rescue of NHK).

だからといって、小田急の公式アナウンスを信じると、えらい目に遭うことは、経験的に知っています。

That said, I know from experience that believing the official Odakyu announcements can get you into trouble.

でもね、「本日中の復旧断念」というアナウンスを、今(23時)に出して、どーする。

-----

最近、会社はWebの事前予約による割引を命令してきますが、はっきり言って「どの電車に乗れるのか分からない」状態での予約は怖いです。

Recently, companies have been ordering discounts for reservations on the web, but honestly, I'm scared of making reservations when I don't know which train I'll be able to get on.

加えて、Webからのキャンセルが、高い確率で失敗します。

In addition, canceling from the web will fail at a high rate.

この損金処理対応で、コールセンタに連絡をして、取消認証処理をして ―― そんなしょーもないことにどれだけの時間を喰われるか、と考えると、事前予約なんて本当に怖くてできません。

When I think about how much time is wasted on such trivial matters as contacting the call center and going through the cancellation authentication process, I can't bring myself to make a reservation in advance.

-----

JRの「みどりの窓口」は、私には、いつでも列が発生しているように見えますし、何かトラブルになっているように見えます。

The JR “Midori no Madoguchi” always seems to have a line and is always in trouble.

「みどりの窓口」を、旅行代理店の相談窓口のように扱う救い難いバカいるようで、これが、さらに列を長くしているらしいです。

Some people treat the Midori no Madoguchi like a travel agent's consultation counter, which is longer than the lines.

ご存知のとおり、「みどりの窓口」は廃止の方向で、数を減らし、最近の特急券は、駅のホームの自販機で購入するように変ってきています。

As you know, the Midori no Madoguchi is being phased out, with the number of ticket offices being reduced, and recently, express tickets are being sold from vending machines on the station platform.

最近の私は、発車3分前に自販機で特急券を購入して、そのまま飛び乗る、というケースが続いています。

Recently, I have been buying express tickets from vending machines three minutes before departure and jumping straight on the train.

-----

ATM機の製造事業から撤収する会社も出てきています。キャッシュレスに進んでいる時代にあっては、仕方がないのかもしれません。

There are also companies withdrawing from the ATM manufacturing business. In an age of moving towards a cashless society, perhaps this is inevitable.

ただ、現金が全く使えない世界というのも困るとは思います。特に災害大国である我が国は、「停電」は常に想定事項です。

However, it would be a problem if cash were utterly unusable. In particular, as a country prone to natural disasters, power outages are something we always have to be prepared for.

『停電時/ネットワーク断絶時のキャッシュレス決済』というのが、重要な課題でしょう。暗号資産は、ローカル決済の方向に伸びていけば、新しい存在意義を確立すると思います。

'Cashless payment in the event of a power outage or network disruption' is probably an important issue. If cryptocurrency grows toward local payment, it will establish a new raison d'etre.

ノリとしては、『とりあえず、スマホの中に2万円分の暗号資産を入れとけ』ですね。

As a rule of thumb, 'for now, put 20,000 yen worth of crypto assets in your smartphone'.

スマホの充電そのものは、このような「手回し発電機」の常備で対応できるでしょう。

You can probably handle charging your smartphone by having a hand-cranked generator like this on hand.

「被災後に『購入しなっかったこと』を絶対に後悔するNo.1商品」

と考えていたのですが、

I thought, but I also thought again, 

―― こんなシステム作るくらいなら、手元に現金置いておく方がラクか?

Wouldn't it be easier to keep the cash on hand than to create a system like this?

という気もしてきました。

むしろ、現行の紙幣や貨幣は、「災害通貨」と呼ばれるよう変わっていくのかもしれません。

The current paper and coin money may change to be called “disaster currency.”

これから政府は、最低3日間の食料備蓄に加えて、「10万円分のアナログ通貨の保管」も呼びかけることになる、という感じですかね。

From now on, in addition to the minimum three-day food stockpile, the government will also call for the storage of “100,000 yen worth of analog currency.” Is that right?

-----

ともあれ、今、日本は、スマホと券売機しかない世界に劇的に移行中です。

Anyway, Japan is currently in the midst of a dramatic transition to a world where smartphones and ticket vending machines are the only things you can use.

このトレンドは航空会社が先行していますが、その対応は杜撰です。

Airlines are leading this trend, but their response is sloppy.

空港で、ようやく係員を見つけて、アプリの対応不良を申し出たら「変ですねぇ」と他人事のような対応されました(本当)。

At the airport, I finally found an attendant and complained about the poor app support, but he responded as if it were someone else's problem (it was).

-----

私たちは、クレームを言う機会すら与えられない世界に突入しています。

We are entering a world where we cannot even make a complaint.

生成AIが、このクレーム対応として威力を発揮できるかどうか、 ―― これだけが、最後の希望です。

Whether or not the generative AI can demonstrate its power in responding to this complaint - this is our last hope.

2025,江端さんの技術メモ

添付ファイルのように、解像度やフレームレートが決まっているので、ビットレートは自動的に決まるような気がします。「1クライアントあたりのビットレート」とは何でしょうか?

「1クライアントあたりのビットレート」とは、ストリーミング配信時に1つのクライアント(視聴者)に対して割り当てられるビットレートを指します。

考えられる動作

  • 固定ビットレート(CBR: Constant Bitrate)の場合

    • 設定したビットレート(例:3072kbps)が、そのまま1クライアントあたりの配信ビットレートとして適用されます。
    • クライアントが増えても、各クライアントに同じビットレートで送信されるため、サーバーの総帯域は**「3072kbps × 接続クライアント数」**となる。
  • 可変ビットレート(VBR: Variable Bitrate)の場合

    • ネットワークの状態や映像の動きによってビットレートが変動する可能性があります。
    • クライアントごとに適応的に異なるビットレートが設定されることがある。

サーバー側の負荷との関係

  • クライアント数が増えると、総帯域も増加
    例えば、10人のクライアントが接続すると、合計ビットレートは 3072kbps × 10 = 30.72Mbps になります。
    サーバーの帯域幅が限られている場合、クライアント数が増えるとストリーミングの品質が低下する可能性があります。

  • マルチキャスト配信(UDP)であれば帯域が一定
    画像の設定では「インターネットモード:Off(UDP)」になっています。
    UDPマルチキャストを使う場合、同じストリームを複数のクライアントに送信できるため、クライアント数が増えてもサーバーの総帯域には影響しにくいです。

設定の意味

この設定が「1クライアントごとのビットレート」になっているため、

  • クライアントごとに3072kbpsで配信される
  • クライアント数が増えると、サーバーの帯域も比例して増加
  • UDP(マルチキャスト)であれば、帯域が固定されて効率的に配信可能

という仕組みになっていると考えられます。

つまり「1クライアントあたりのビットレート」というのは「1クライアントあたりのビットレートの上限値」という解釈で良いですか。つまり、それ以上のビットレートは出せない、という意味である、ということで良いですか?

「1クライアントあたりのビットレート」=「1クライアントあたりのビットレートの上限値」 という解釈でほぼ正しいです。
つまり、設定したビットレートを超えるデータ量は送信されない という意味になります。

ただし、可変ビットレート(VBR) の場合は少し異なり、最大値としての上限 になりますが、実際のビットレートは映像の内容に応じて変動 します。
逆に、固定ビットレート(CBR) では 常に設定値で送信 されます。

具体的な挙動

配信モード 「1クライアントあたりのビットレート」の意味
固定ビットレート(CBR) 常に設定値のビットレートで送信(超えないし、下回らない)
可変ビットレート(VBR) 最大値としての上限(超えないが、低くなることはある)
フレームレート指定 フレームレートを固定しつつ、CBRまたはVBRを適用
ベストエフォート指定 ネットワーク状況に応じて変動(上限なしの場合も)

結論

「1クライアントあたりのビットレート」は、基本的には「上限値」として機能し、設定値を超えることはない
ただし、ビットレートの挙動は配信モードに依存する ため、VBRでは上限値未満で可変、CBRでは常に設定値 という違いがある。

今回の場合、ユーザは数人程度しかいません。
配信モードは「固定ビットレート」「可変ビットレート」「フレームレート指定」「ベストエフォート指定」のメニューがあります。
解像度は640x360で、5fps,10fps,20fpsの3種類の転送実験を行いたいと思っています。

選択すべき配信モード、解像度とfpsに対する、1クライアントあたりのビットレートを表にして示して下さい

推奨設定とビットレート表

1. 配信モードの選択

  • 「フレームレート指定」 が適切
    • 実験の目的が「解像度 640×360」で 5fps, 10fps, 20fps の転送実験 を行うことなので、フレームレートを固定できるモードを選択するのが適切。
    • 「固定ビットレート」では画質が保証されず、特に低fps時に無駄なビットレート消費が発生する可能性がある。
    • 「ベストエフォート指定」ではネットワーク状況に応じて変動するため、実験の統一性が損なわれる可能性がある。
    • 「可変ビットレート(VBR)」も画質を維持しやすいが、フレームレートとの相性が不明なため、今回の実験には適さない可能性がある。

2. 各設定における推奨ビットレート

解像度 フレームレート 推奨ビットレート(H.264, 1クライアントあたり)
640×360 5fps 93kbps(最低100~150kbps推奨)
640×360 10fps 185kbps(最低200~300kbps推奨)
640×360 20fps 370kbps(最低400~600kbps推奨)

3. 補足

  • ビットレートの決定方法
    • 参考値として フルHD(1920×1080, 30fps)の5000kbps を基準に、解像度とfpsの比率を使ってスケーリングして計算。
    • 実際の設定では、若干高めのビットレート(表の推奨範囲)を指定した方が安定する。
  • 配信モードの調整
    • 「フレームレート指定」+「固定ビットレート」(上記の推奨値)で安定した画質を維持しやすい。
    • ネットワーク帯域に余裕があれば 「可変ビットレート(VBR)」を試して、最低ビットレートを表の値以上に設定する ことで、より滑らかな映像が得られる可能性もある。

4. 最適な設定の結論

設定項目 推奨値
配信モード フレームレート指定
解像度 640×360
フレームレート 5fps, 10fps, 20fps(それぞれ実験)
1クライアントあたりのビットレート 最低値を超えるよう設定(推奨範囲:100~600kbps)

結論:

  • 実験では「フレームレート指定」モードを選択
  • 各fpsに対応する最低ビットレートを超えるように設定
  • ネットワークに余裕があれば、少し高めのビットレート(推奨範囲内)を選択
  • 可変ビットレートも試してみる価値あり(最低値を超える設定で)

未分類

私は、11:30の特急に乗る予定だったのですが、10:30の列車が動いていません。

I planned to take the 11:30 express train, but the 10:30 train is not running.

強風で止まるとは聞いていたのですが、何時間も止まるとは思いませんでした。

I had heard it would stop in strong winds, but I didn't think it would stop for hours.

地震、豪雨、豪雪、人身事故は分かりますが「強風」です。

I understand earthquakes, torrential rain, heavy snowfall, and personal injury, but “strong winds.”

これには困りました。

This was a problem.

常磐線は代替交通手段がありません。

There is no alternative transportation on the Joban Line.

上野からピクリとも動かない特急電車の中で、待機していたのですが「架線にビニールがひっかった」とか、「倒木」とか、さらに不穏な車内放送が響きました。

I was waiting in the express train, which hadn't moved an inch from Ueno, when I heard an even more disturbing announcement over the loudspeaker: “There's a piece of plastic caught in the overhead wires” and “A fallen tree”.

『こりゃ、運転開始後も、到着時間が見込めないな』と判断して、出張を断念する旨を、先方に連絡しました。

I decided that I couldn't estimate the arrival time even after the drive started, so I contacted the other party to inform them that I would have to cancel the business trip.

今回の仕事は、機材持ち込んで、6~8時間くらい、ぶっつづけでシステム構築作業&実験の予定だったからです。

This time, I planned to bring in my equipment and work on system construction and experiments for 6 to 8 hours straight.

仕方なく、上野から自宅に帰宅中しました。そんでもって、自宅でシステムを組み立てて、システムチューニングをしていました。

I had no choice but to go home from Ueno. Then, I set up the system at home and performed system tuning.

-----

何が痛いって、失った時間が痛い。

What hurts is the time I've lost.

待機時間を含めると、本日、上野までの往復と、止った電車の中での時間併わせて、貴重な5時間が吹っ飛びました。

If you include the waiting time today, the time spent on the train to Ueno and back, and the time spent on the stopped train, a precious 5 hours have flown by.

出張には時間のリスクはつきものとはいえ、それにしても痛い。

Even though business trips are always risky, this is still painful.

-----

最近、30分多く時間がかかっても、新宿駅を回避するルートを選ぶようにしています。

Recently, even if it takes 30 minutes longer, I try to choose a route that avoids Shinjuku Station.

小田急新宿駅の、到着時間がアテにならないからです。

Because the arrival time at Odakyu Shinjuku Station is unreliable.

新宿駅は人が多く、相対的にバカとの遭遇率が高くなる、というのも、理由の一つですが。

One reason is that Shinjuku Station is very busy, and the rate of encounters with idiots is relatively high.

私、人生でナンパをしたこと一度もないので分かりませんが、ナンパする奴の知能や知性って、こんなにレベル低いんですか?

小田急は新宿駅周辺で、人身事故でもないのに、普通に遅延が発生します。

Odakyu trains are regularly delayed in Shinjuku, even when no accident occurs.

今や、小田急に限らず、今や都内の電車の到着時刻が、あてになりません。

Now, not just with Odakyu, but the arrival times of trains in the Tokyo area are unreliable.

今日も、わざわざ回避ルートを使ったのに(川崎駅経由)、こともあろうに、そのルートで人身事故の影響をくらいました。

Today, even though I took the detour (via Kawasaki Station), I was affected by a personal injury accident on that route.

「飛び込み自殺だけはやめとけ」と、私がこんなにも言い続けているのに、なぜ分かってくれないのだろう。

Why don't they understand me when I keep saying, “Don't do a suicide dive”?

(↑コラムに飛びます)

(Jump to the column)

いや、分かっています。私も危なかったこと、ありましたから(遠い目)。

No, I know. I've been in danger, too (looking far away).

-----

最近、ホームゲートが次々と設置されています。データからも、ホームゲートによる人身事故の防止は明らかですが、それでも、私の調べた範囲で、ホームゲートを飛び越えて自死した人も二人います。

Recently, more and more platform gates have been installed. The data clearly shows that platform gates prevent accidents involving people, but even so, within the scope of my research, there have been two people who have jumped over the platform gates and killed themselves.

ホームゲートを飛び越える気力が残っているなら、私なら、もっとラクで確実な自死方法をアドバイスできると思います(こっちにも書いてあります)。

If you still have the energy to jump over the home gate, I think I can advise you on a more comfortable and reliable method of suicide (it's also written here).

-----

強風、豪雨、豪雪、列車過密、信号機トラブル、車内設備トラブル、人身事故、乗客トラブル、人身事故....

High winds, heavy rain, heavy snow, overcrowded trains, signal trouble, in-train equipment trouble, personal injury, passenger trouble, personal injury...

「世の中思い通りにならない」ということは、当たり前なのですが、その当たり前が、なかなか、受け入れがたいものです。

It's evident that “the world doesn't always go how you want it to,” but it's not easy to accept that obvious fact.

2025,江端さんの忘備録

私が町内会の役員をやらされていた時、町内会でWeb管理担当していた人が、突然引越ししてしまって、その役が私に回ってきたことがありました。

When I was appointed an officer of the neighborhood association, the person in charge of web management suddenly left, and I took on the role.

私は、従来のWebシステムを全部廃棄して、WordPressでスクラッチから作り直しました。

I scrapped the existing web system and rebuilt it from scratch using WordPress.

その上で、町内会館の予約管理システムは、Googleスプレッドシートだけを使用するものにして、3ページくらいの運用手順マニュアルだけを残して、退任しました。

After that, I left the management system for the community center's reservation system using only Google Spreadsheets. I left behind only a three-page operational procedure manual and retired.

頼まれれば、Web管理くらいサポートするつもりはあったのですが、誰一人として私に頼まなかったので、私もそのままにしてきました。

I was willing to help with web management if asked, but since no one asked, I left it as it was.

私が任期満了で退任した後も、同じ仕様のまま稼動し続けているようです。

It seems it still operates with the exact specifications even after I left office at the end of my term.

町内会のWebシステムは、『予約システム』と『町内会報表示システム』があれば、十分で、これ以上の機能を実装してはダメだと思っています。

A neighborhood association's web system is sufficient if it has a 'reservation system' and a 'neighborhood association newsletter display system,' it should not have any more functions than that.

下手な機能を入れると、役員の入れ替え時に、運用継承に失敗してコケます。

If you add a poorly designed function, it will fail to inherit operations when the board of directors is replaced, and you will look foolish.

-----

どの会社も、新システムの構築を簡単に提案しますが ―― 私は、新システム導入に対してはネガティブです。

Every company will easily propose building a new system, but I am pessimistic about introducing a new system.

旧システムを、チマチマと部分リプレースをし続けていく方が、ラクなんじゃないかな、と思うことがあります。

Sometimes, I think it would be easier to continue replacing parts of the old system bit by bit.

私の考える、システムの最優先課題は「動くこと」「停止しないこと」、さらに加えるのであれば「ユーザインターフェースを極力変えないこと」です。

The top priorities for the system, in my opinion, are “working” and “not stopping,” and if I could add one more, it would be “not changing the user interface as much as possible.”

『新しいことに飛びつかない』『必要最低限必要なサービスを、これから100年も続ける』という、サウスウエスト航空のポリシーに、古都(京都)の和菓子屋、呉服屋、伝統工芸の精神を垣間みる思いでした。

そんなことを、最近のNHKと日本IBMの事件(*)のニュースを見ながら考えていました。

I was thinking about this while watching the news about the recent NHK and IBM Japan incident (*).

(*)NHKは、受信料契約などを管理する新しい営業基幹システムの開発を日本IBMに委託していましたが、納期の大幅な遅延が見込まれるとして、2024年8月に契約を解除しました。これに伴い、NHKは既に支払った約30億円の返還と損害賠償を求め、総額約54億7千万円の訴訟を東京地方裁判所に提起しました。

(*) NHK had commissioned IBM Japan to develop a new core business system to manage subscription contracts, but in August 2024, it canceled the contract due to the expected significant delivery delay. In response, NHK filed a lawsuit in the Tokyo District Court seeking the return of the approximately 3 billion yen it had already paid and compensation for damages, for approximately 5.47 billion yen.

『どっちの言い分も、よく分かるなぁ』というのが、私の感想です。

My impression is that I can understand both sides of the argument.

そもそも、この手の事件は、私にとって、他人事ではありません。

To begin with, this kind of incident is not someone else's problem for me.

-----

企業が旧システムを使い続けるデメリットは、沢山あります。

There are many disadvantages to companies continuing to use old systems.

■コードのスパゲッティ化や互換性の問題が蓄積し、運用・保守が困難、かつ高くなる。技術者もいなくなる。パフォーマンスも悪くなる。

■The accumulation of code spaghetti and compatibility issues makes operation and maintenance difficult and expensive. There will also be a shortage of engineers. Performance will also deteriorate.

■セキュリティリスクが残り続ける

■Security risks continue to persist

の他に、企業として致命的なデメリットは、

In addition, there are also fatal disadvantages for companies, such as

■競争力のあるビジネス基盤にならない

■ It will not become a competitive business base.

■モバイル対応やシングルサインオン(SSO)など、時代のニーズに答えられない

It does not meet the needs of the times, such as mobile support and single sign-on (SSO).

があります。

そもそも、町内会のシステムと、企業の基幹システムでは、「モノ」が違います。町内会には、競争も競合も新サービスも必要ありません。

To begin with, the systems of neighborhood associations and core corporate systems are different. Neighborhood associations do not need competition, rivalry, or new services.

企業は「のんきに、旧システムのリプレースを続ける」などとは言ってられないのかもしれません。

Companies may not say, “We'll just continue replacing old systems without a care in the world.”

-----

システムとは『"動かない"が"デフォルト"で、動いたら"ラッキー"』なものであり、そのラッキーの上に、次のラッキーが詰み重なってできているものです。

A system is “unmoving by default, and if it moves, it's ‘lucky,’” and any system of one lucky thing piled on top of another.

私たちの世界を支えているものが「ラッキー」でできている、という事実は、あまり理解されていないです。

The fact that the things that support our world are made of “lucky” is not well understood.

例えば、高村薫さんの著書『神の火』の中では、原子炉の制御システムが経験値を踏襲しているものがほとんどで、そのパラメタに論理的な根拠がない(ものが多い)、という事実が記載されています ―― これをフィクションとして読み流せる人は、たぶんエンジニアではありません(エンジニアなら、この恐しさに震えなければなりません)。

For example, in the book “Kami no Hi” by Takamura Kaoru, it is stated that most of the control systems for nuclear reactors are based on empirical values and that many of these parameters have no logical basis - people who can read this as fiction are probably not engineers (engineers should be trembling with fear).

社会インフラのシステムも同様です。今、流行のDDOS攻撃なんぞは、システムの入口への攻撃に過ぎません。

The same is true of social infrastructure systems. DDOS attacks, which are popular at the moment, are just attacks on the entrance to the system.

一度、攻撃者にシステムの侵入を許したら、もう、そのシステムは死に体も同然です。

Once an attacker has gained access to a system, it is as good as dead.

システムを作った人間や、あるいはシステムの内部の運用者が攻撃者になれば、システムの破壊は防ぎようがありません。

If the person who created the system or the operator of the system becomes the attacker, there is no way to prevent the destruction of the system.

そう考えていくと、私たちの社会システムは、結構な「性善説」で成りたっているのです。

When you consider it, our social system is based on a somewhat optimistic view of human nature.

-----

ところで、町内会のWebサイトのトップページに『退会届け』のメニューを作り込んだのは、私です。

By the way, I was the one who added the “Withdrawal Form” menu to the top page of the neighborhood association website.

まだ、Webデザインの変更はされていないようです。

It seems that the web design has not been changed yet.

変更できる人がいないだけかもしれませんが。

It may just be that no one can make the change.

未分類

🔷 まとめ

移行方法 確実にデータを移行できるか? リスク
docker commit + docker save/load ❌ データがボリュームにあると移行できない データが失われるリスクあり
Docker Volume を使う ✅ どの環境でも確実に移行できる リスクなし(安全)

✅ 「どちらか分からないなら、Docker Volume を使うのが安心!」

ボリュームを使っていれば確実にバックアップされるし、もしコンテナの中にデータがあっても問題なく移行できるので、安全な方法! 🎯

2025,江端さんの忘備録

11日の休日は、

On the 11th, my holiday,

(1)午前中に、Docker Desktopからコンテナをエクスポートして、別のマシンのWindowsのWSLにDocker環境を構築してインポートし、

(1) in the morning, I was going to export a container from Docker Desktop, build a Docker environment on Windows WSL on another machine, and import it,

(2)午後からは日本語のドラフトを英文カンファレンスペーパーにする

(2) in the afternoon, I was going to turn a Japanese draft into an English conference paper

つもりでした。

スマートに、エレガントに、コーヒーカップを片手にしながら。

Smartly and elegantly while holding a cup of coffee in my hand.

なのに、なんでどうしてこうなる?

But why did it turn out like this?

―― 翌日の深夜午前4時まで、連続18時間格闘し続けて、上記『午前中』の処理が、まだ完了していない(継続中)

I continued to fight for 18 hours straight until 4 am the next day, and the above 'morning' process is still incomplete (still ongoing).

複数のマシンにばらまいていたDockerのデータベースの中身がスカスカで、バックアップのほぼ全部が「ザル」であったことが分かり、心底青さめています。

I was disappointed to find that the contents of the Docker database, which had been spread across multiple machines, were very sparse and that almost all of the backups were “sieve-like.”

今やれることは、何でもやっている、という感じです。

I feel like I am doing everything I can right now.

イントラネットの実験用のマシンとして使うために、Windowsのセキュリティを全解除したいです(pingとか、ポートオープンとか面倒くさい)。設定方法を教えてください。

バックアップが不安な状態が続く状態が怖くて、1秒も早くこの作業を完了したいのですが、定例と出張で、そんな時間取れません。

I'm scared that the uncertainty about the backup will continue, and I want to complete this task as soon as possible, but I can't find the time to do it with my regular work and business trips.

なんか体調も悪くなってきました(喉が痛い)。

I'm starting to feel unwell (my throat hurts).

こんな気持ちと体調のまま、週末に突入するのか、と考えるだけで、死ぬほど憂鬱(ゆううつ)です。

Just thinking about entering the weekend with these feelings and physical condition is enough to make me feel depressed to the point of death.

だれか、私に「大丈夫だよ。なんとかなるよ」と、耳元でささやいて欲しい。

I want someone to whisper in my ear, “It's okay. You'll manage somehow.”

嘘でもいいから。

Even if it's a lie.

未分類

Windowsのセキュリティを全解除する方法を説明します。ただし、これはセキュリティリスクが極めて高いため、イントラネット内での実験用に限定し、外部ネットワークに接続しないことを強く推奨します。


1. Windows Defender ファイアウォールを完全無効化

方法1: コマンドで無効化

管理者権限のPowerShellを開いて、以下のコマンドを実行してください。

powershell
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False

これで、全ネットワークプロファイルのファイアウォールを無効化します。

とりあえず、ここまででいいかな。

方法2: GUIで無効化

  1. ファイアウォールとネットワーク保護 を開く
  2. ドメイン ネットワークプライベート ネットワークパブリック ネットワーク の3つ全てを「オフ」にする

2. Windows Defenderのリアルタイム保護を無効化

管理者権限のPowerShellで以下を実行:

powershell
Set-MpPreference -DisableRealtimeMonitoring $true

GUIで行う場合:

  1. Windows セキュリティウイルスと脅威の防止
  2. ウイルスと脅威の防止の設定リアルタイム保護 をオフにする

3. Windows SmartScreenを無効化

管理者権限のPowerShellで以下を実行:

powershell
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Explorer" -Name SmartScreenEnabled -Value Off

GUIで行う場合:

  1. Windows セキュリティアプリとブラウザーコントロール
  2. SmartScreen の全項目をオフにする

4. UAC(ユーザーアカウント制御)を無効化

レジストリを変更することで完全無効化できます。

powershell
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name EnableLUA -Value 0

変更後、再起動が必要です。


5. Pingを許可

ICMP(ping)を許可するには、以下のコマンドを実行:

powershell
New-NetFirewallRule -DisplayName "Allow ICMPv4" -Protocol ICMPv4 -IcmpType 8 -Action Allow -Direction Inbound

6. すべてのポートを開放

方法1: 特定のポートをすべて開放

以下のコマンドで全ポートを開放:

powershell
New-NetFirewallRule -DisplayName "Allow All Ports" -Direction Inbound -Action Allow -Protocol Any -Enabled True

方法2: ファイアウォールを完全無効化

上記の**「1. ファイアウォールを無効化」**を実施すれば全ポート開放されます。


7. Windows Updateの無効化

Windows Updateを完全に無効化したい場合:

powershell
Stop-Service -Name wuauserv -Force
Set-Service -Name wuauserv -StartupType Disabled

8. 共有フォルダの制限解除

管理者権限のPowerShellで、SMBの制限を解除:

powershell
Set-SmbServerConfiguration -EnableSMB1Protocol $true -Force
Set-SmbServerConfiguration -EnableSMB2Protocol $true -Force

さらに、ファイル共有を完全開放するには以下を実行:

powershell
New-SmbShare -Name "Shared" -Path "C:\Shared" -FullAccess Everyone

"C:\Shared" を共有フォルダとして、全ユーザーにフルアクセスを付与します。


9. リモートデスクトップを有効化

RDPを有効にするには、以下のコマンドを実行:

powershell
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name fDenyTSConnections -Value 0
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"

10. 自動ログインの設定

特定のユーザーで自動ログインしたい場合、以下のレジストリ設定を変更:

powershell
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name AutoAdminLogon -Value "1"
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name DefaultUserName -Value "YourUserName"
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name DefaultPassword -Value "YourPassword"

注意点

  • 外部ネットワークには絶対に接続しないこと
  • 一度無効化したら、戻すのも手間がかかるため慎重に
  • Windows Updateを止めると脆弱性が残るので要注意

イントラネット環境での実験用なら問題ありませんが、セキュリティリスクを理解した上で行ってください。

2025,江端さんの技術メモ

DockerのPostgreSQLデータベースをWindows→WSLのDockerへ移行する方法

Windows上のDockerで動作するPostgreSQLデータベースを、WSL(Windows Subsystem for Linux)のDockerに移行する 手順を説明します。


🔷 方法 1: Dockerボリュームごと移行する(推奨)

Windowsでは grepbusybox は不要 で、標準的な PowerShellコマンド を使用して移行できます。

📌 ① ボリューム名を確認

まず、PostgreSQLのデータが保存されているボリューム名を確認します。

powershell
docker volume ls

出力例:

DRIVER VOLUME NAME
local hakata_db-data

この hakata_db-data がPostgreSQLのデータが格納されているボリュームです。


📌 ② ボリュームをtarファイルにバックアップ

PowerShellを管理者権限で開き、以下のコマンドを実行します。

docker run --rm -v hakata_db-data:/data -v C:\Users\tomoi\backup:/backup ubuntu tar czf /backup/hakata_db_backup.tar.gz -C /data .

重要なポイント

  • C:\Users\tomoi\backup はWindows側のバックアップ保存先(任意のフォルダを指定)
  • ubuntu イメージを使用(busybox は不要)
  • hakata_db_backup.tar.gz という圧縮ファイルが作成される

この hakata_db_backup.tar.gz をUSBやネットワーク経由で 移行先のマシンへコピー します。


📌 ③ WSLのDocker環境にファイルをコピー

WSLのファイルシステムにバックアップを移動します。

powershell
wsl

WSL内で以下のコマンドを実行して、WindowsのバックアップファイルをWSLの /home/ ディレクトリにコピー。

cp /mnt/c/Users/tomoi/backup/hakata_db_backup.tar.gz /home/

📌 ④ WSLのDockerでボリュームを作成

WSL内で以下を実行し、新しいボリュームを作成します。

docker volume create hakata_db-data

作成したボリュームにデータを展開します。

docker run --rm -v hakata_db-data:/data -v /home:/backup ubuntu tar xzf /backup/hakata_db_backup.tar.gz -C /data

📌 ⑤ WSLのDockerでPostgreSQLコンテナを起動

WSL内で以下を実行し、データをマウントしたPostgreSQLコンテナを起動。

docker run -d --name postgres_hakata -p 15432:5432 -v hakata_db-data:/var/lib/postgresql/data postgres:16

📌 ⑥ データが正しく復元されたか確認

PostgreSQLコンテナに接続してデータを確認。

docker exec -it postgres_hakata psql -U postgres

データベース一覧を表示:

\l

2025,江端さんの技術メモ

音声を無視して、最も一般的な webm → mp4 変換コマンドは以下のようになります。

ffmpeg -i input.webm -vf "scale=640:360" -r 5 -c:v libx264 -preset slow -crf 23 -an output.mp4

説明:

  • -i input.webm:入力ファイルの指定
  • -vf "scale=640:360":解像度を640x360に変更
  • -r 5:フレームレートを5fpsに変更
  • -c:v libx264:H.264コーデックでエンコード
  • -preset slow:エンコード速度と圧縮率のバランスをとる(品質優先)
  • -crf 23:品質を指定(数値が低いほど高品質)
  • -an:音声を削除(無音にする)
  • output.mp4:出力ファイルの指定

このコマンドで、音声なしの mp4 に変換できます。