Skip to content

Instantly share code, notes, and snippets.

@masakielastic
masakielastic / glm-image.md
Created January 15, 2026 02:26
GLM Image のテスト
A Hasselblad film–style portrait set in soft indoor lighting.

A long-haired woman stands near a window, partially turned away,
caught in a quiet, unguarded moment rather than posing.
Her posture is slightly off-balance, with subtle asymmetry in her shoulders and neck,
as if she shifted her weight unconsciously.

Branches outside the window sway in the breeze,
casting uneven, dappled light across her face and collarbone.
@masakielastic
masakielastic / README.md
Created December 27, 2025 03:18
Symfony 8 系で Hello World

Symfony 8 系で Hello World

Chromebook の Linux 環境。

最初に PHP 拡張をチェックします。

PHP 拡張のチェック

@masakielastic
masakielastic / README.md
Created December 27, 2025 00:06
Chromebook で Composer をインストールする (IPv6 対応)

Chromebook で Composer をインストールする (IPv6 対応)

Chromebook の Linux 環境では IPv6 が原因で Composer 自身や Composer 経由でのパッケージをインストールできないことがあります。 一時的に無効にするには次のコマンドを実行します。

sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
@masakielastic
masakielastic / README.md
Last active December 26, 2025 21:27
Next.js で Hello World

Next.js で Hello World

プロジェクトを作成します。

npx create-next-app@latest hello-next

使う機能の質問がされるので、次の選択肢を選びました。

@masakielastic
masakielastic / 01-README.md
Last active December 26, 2025 20:46
Poem で OpenAPI 対応のドキュメント管理

Poem で OpenAPI 対応のドキュメント管理

Cargo.toml を次のように書く。

[package]
name = "poem-rest"
version = "0.1.0"
edition = "2021"
@masakielastic
masakielastic / README.md
Last active December 26, 2025 20:01
Poem で Hello World

Poem で Hello World

プロジェクトを作成します。

cargo new poem-hello
cd poem-hello
@masakielastic
masakielastic / README.md
Last active December 26, 2025 19:54
Fil-C で C 言語のコンパイル

Fil-C で C 言語のコンパイル

動作確認環境は Debian 12。Rust プログラムのコンパイルでエラーになるので .profileCC を設定した

CC=/usr/bin/cc

バイナリの入手

REPL で Pydantic を学ぶ

Pyndantic v2 を前提とします。

パッケージの導入

仮想環境を作成します。

niquests による HTTP リクエスト

import niquests

r = niquests.post('https://httpbin.org/post', data={'key': 'value'})
print(r.json())

pyreqwest で HTTP クライアント

from pyreqwest.client import SyncClientBuilder;

client = SyncClientBuilder().build()
res = (
    client
 .get("https://httpbun.com/get")