Skip to content

Instantly share code, notes, and snippets.

View t-nissie's full-sized avatar

Takeshi Nishimatsu t-nissie

View GitHub Profile
@t-nissie
t-nissie / !mruby4cygwin.md
Last active April 30, 2026 17:34
Compile mruby on Cygwin

Compile mruby on Cygwin

Few people may compile mruby on Cygwin, but here are memos for mruby-4.0.0 and After mruby-4.0.0.

Preparation

Install gcc, ruby, gem and git via Cygwin setup. Install rake with gem install rake.

/* WebAssembly/WASM/Emscripten Arguments.c can get three arguments from URL parameters */
/* For example: http://localhost:6931/arguments.html?foo=Hello%2c&bar=Takeshi%20Nishimatsu&baz=Everything%20is%20OK%3f */
/* See also JavaScript between </script><script> in template.html. */
/* Import canvas.c and canvas.h from https://github.com/alextyner/wasm-canvas */
#include "canvas.h"
int main(int argc, char** argv) {
HTMLCanvasElement *canvas = createCanvas("myCanvas");
canvas->setWidth( canvas, 600);
canvas->setHeight(canvas, 400);
CanvasRenderingContext2D *ctx = canvas->getContext(canvas, "2d");
@t-nissie
t-nissie / Animation.c
Last active March 23, 2026 13:29
animation with wasm-canvas
// Animation.c
// wasm-canvas: https://github.com/alextyner/wasm-canvas
// How to compile and run locally (as written in Makefile):
// ln -s SOMEWHERE/wasm-canvas/src/canvas.c .
// ln -s SOMEWHERE/wasm-canvas/src/canvas.h .
// emcc -c -o animation.o animation.c
// emcc -c -o canvas.o canvas.c
// emcc --shell-file template.html animation.o canvas.o -o index.html
// emrun index.html
////
@t-nissie
t-nissie / ArcWASM.c
Last active March 22, 2026 07:06
Draw an arc with wasm-canvas
// ArcWASM.c draws a rectangle and an arc with wasm-canvas as same as original.html
// wasm-canvas: https://github.com/alextyner/wasm-canvas
// How to compile and run locally (as written in Makefile):
// ln -s SOMEWHERE/wasm-canvas/src/canvas.c .
// ln -s SOMEWHERE/wasm-canvas/src/canvas.h .
// emcc -c -o ArcWASM.o ArcWASM.c
// emcc -c -o canvas.o canvas.c
// emcc --shell-file template.html ArcWASM.o canvas.o -o index.html
// emrun index.html
////
@t-nissie
t-nissie / !deepmdkit.md
Created August 25, 2025 21:40
DeePMD-kit with CPU without GPU on Ubuntu 24.04.3 LTS

DeePMD-kiy Memo

On going!

$ sudo apt install mpich libmpich-dev
$ sudo apt install mpich libxc-dev
$ sudo apt install mpich libfftw3-dev
$ sudo apt install python3.12-venv

$ tar xf qe-7.4.1-ReleasePack.tar.gz

@t-nissie
t-nissie / !Mercari.md
Last active January 24, 2026 07:17
メルカリの暗号資産(ビットコイン、イーサリアム、XRP)の月間取引報告書CSVファイルから確定申告のために年中購入または年中売却の数量と金額を計算するRubyスクリプト(とそれをCrystalで書き直したもの)

mercari.rb and mercari.cr

メルカリの暗号資産(ビットコインBTC、イーサリアムETH、XRP)の月間取引報告書CSVファイルから 確定申告のために年間の損益計算をするためのRubyスクリプトmercari.rbと それをCrystal言語に移植したmercari.cr

ライセンスは GPLv3 で、完全無保証です。税務署に怒られてもしりません。

参考文献: https://help.jp.mercari.com/guide/articles/1513/ メルカル ビットコイン取引 取引報告書・損益計算方法

@t-nissie
t-nissie / !3dp.md
Last active January 14, 2025 19:56
Memo: My 3D Printers

Memo on 3D Printers

I make some 3D Printers with 3D printers.

My 3D Printers

Kingroon KP3D Pro

  • Nozzle: 1.2 mm

Osiad Black

@t-nissie
t-nissie / !mrubybind.md
Last active February 23, 2025 04:40
C++のクラスやメソッドを半自動的にmrubyに変換(bind)してくれるmrubybindを調査
@t-nissie
t-nissie / !mruby.md
Last active April 26, 2026 12:44
mrubyをC言語のシミュレーションのプログラムに組み込んでDSLとして利用する

mrubyをC言語のシミュレーションのプログラムに組み込んでDSLとして利用する

シミュレーション、CAD、画像処理、ゲーム、エディタなどのアプリで Tcl, Scheme, Lua, Python, LISPなどが domain-specific language (DSL) として採用されていて、 パラメーターサーチ、 繰り返し処理、

@t-nissie
t-nissie / !Munimula.md
Last active June 27, 2025 20:49
CoreXY printer.cfg for EasyThreeD ET4000+ board

Munimula CoreXY 3D Printer