Skip to content

Instantly share code, notes, and snippets.

@nogajun
nogajun / bl2md.py
Last active March 8, 2025 12:41
bl2md.py - Convert Bludit CMS data files to Markdown files
"""
bl2md.py - Convert Bludit data files to Markdown files
Synopsis:
bl2md.py <Bludit metadata file> <Bludit markdown directory> <Markdown output directory>
Example:
python bl2md.py databases/pages.php pages/ output/
@nogajun
nogajun / flyfish_a7_maintenance_mode.md
Last active April 6, 2025 05:57
Flyfish A7 メンテナンスモードメモ

Flyfish A7 メンテナンスモードメモ

電動バイクFlyfish A7のメンテナンスモードのメモです。パラメーターの意味は、公開されていないのでわかりません。参考になるかもしれないので置いておきます。

Flyfish A7は第1種原動機付自転車の電動バイクです。電動アシスト自転車ではありません。免許、ヘルメット、保安部品(ウィンカー、ライトなど)、ナンバープレート、自賠責保険加入が必要です。

@nogajun
nogajun / docker-compose.rocm-apu.yml
Created September 6, 2024 07:41
docker compose file to use ollama and Open WebUI with APU rocm.
services:
ollama:
image: ollama/ollama:rocm
container_name: ollama
devices:
- /dev/kfd
- /dev/dri
volumes:
- ollama:/root/.ollama
environment:
@nogajun
nogajun / libreoffice_build.md
Last active August 22, 2024 13:19
libreoffice repository clone and build tips

LibreOffice Building Tips

Cloning repositories

This is about cloning LibreOffice repositories. since LibreOffice source code repositories are large and far away, you can quickly clone the source code using shallow clone from a github mirror.

git clone -o github --depth=1 --recurse-submodules --shallow-submodules https://github.com/LibreOffice/core.git libreoffice
@nogajun
nogajun / list1a.py
Created May 26, 2024 06:06
ported from MSX Graphic workbook(1984) p.69 List 1a / MSXグラフィック・ワークブックからのPython移植
# ported from MSX Graphic workbook(1984) p.69 List 1a
import pyxel
size = 255
count = 36
step = size / count
color = pyxel.COLOR_WHITE
pyxel.init(size, size)
pyxel.cls(pyxel.COLOR_PURPLE)
@nogajun
nogajun / app.py
Created December 29, 2022 10:48
Flaskでカレンダーを表示する
@app.route('/calendar')
def month_list():
dt_now = datetime.now()
month = calendar.monthcalendar(dt_now.year,dt_now.month)
return render_template("calendar.html", month = month)
@nogajun
nogajun / Dockerfile
Last active September 6, 2022 00:39
For web app creation class. used from dev container on Visual studio code.
FROM debian:bookworm
LABEL version="1.2"
LABEL maintainer="[email protected]"
LABEL description="For web app creation class. used from dev container on Visual studio code."
# 必要なパッケージをインストール
RUN apt-get -y update && \
apt-get -y full-upgrade && \
apt-get -y install apt-utils locales sudo python3-all python3-pip python3-venv python-is-python3 python3-yaml bash-completion wget curl jq git task-japanese
@nogajun
nogajun / tmx2tsv.xsl
Last active November 19, 2022 04:33
xsltprocを使って翻訳メモリのtmxファイルをcsvに変換するXSLTファイル
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="utf-8" />
<xsl:template match="/">
<xsl:text>"en-US"&#x9;"ja"</xsl:text>
<xsl:text>&#xA;</xsl:text>
<xsl:for-each select="tmx/body/tu">
<xsl:text>"</xsl:text>
<xsl:value-of select="tuv[@lang='en-US']/seg"/>
<xsl:text>"&#x9;"</xsl:text>
@nogajun
nogajun / dynamite-color.gpl
Created September 21, 2020 01:51
BTS Dynamite logo color palette for GIMP/LibreOffice
GIMP Palette
Name: Dynamite
Columns: 12
#
226 7 68
64 181 207
211 116 151
115 172 123
103 33 124
240 103 6
@nogajun
nogajun / ms_ui_strings_csv_cleanup.sh
Created December 15, 2019 03:37
MicrosoftランゲージポータルにあるUI訳語データCSVがまともなCSVじゃないのでクリーンアップしてCSVとして使えるようにするワンライナー
sed -e '1,12d' -e 's/",,"/\t/g' -e 's/^"//g' -e 's/"$//g' ja-JP-csv-Excel.csv > a.csv