Skip to content

Instantly share code, notes, and snippets.

@MasWag
MasWag / Dockerfile
Last active April 17, 2025 23:56
Dockerfile to build LTSMin 3.1.0-beta2
# Stage 0: Builder
FROM debian:bookworm AS builder
# 1) Base tools & Spot repo key
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates wget gnupg lsb-release
# 2) Add Spot’s Debian repo (stable)
RUN wget -qO- https://www.lrde.epita.fr/repo/debian.gpg | apt-key add - && \
(leaf satysfi
:mode (("\\.saty$" . satysfi-mode)
("\\.satyh$" . satysfi-mode)
("\\.satyg$" . satysfi-mode))
:hook (satysfi-mode-hook . lsp)
:config
(cond ((equal system-type 'darwin)
(setq satysfi-pdf-viewer-command "open -a Skim"
satysfi-command "opam exec satysfi"))
((equal system-type 'gnu/linux)
@MasWag
MasWag / append_only.rs
Created January 4, 2025 06:42
Sequence with dynamic update in Rust
use std::rc::Rc;
use std::cell::{Ref, RefCell};
struct AppendOnlySequence<T> {
data: Rc<RefCell<Vec<T>>>,
}
impl<T> AppendOnlySequence<T> {
pub fn new() -> Self {
Self {
@MasWag
MasWag / PKGBUILD
Created August 7, 2024 05:46
PKGBUILD for spot 2.12
# Maintainer: Stefan Husmann <[email protected]>
# Maintainer: Clément Démoulins <[email protected]>
# Contributor: Aaron Schaefer <[email protected]>
# Contributor: Masaki Waga <[email protected]>
pkgname=spot
pkgver=2.12
pkgrel=1
pkgdesc="A C++17 library for LTL, omega automata manipulation and model checking."
arch=('i686' 'x86_64')
@MasWag
MasWag / PKGBUILD
Last active August 7, 2024 05:29
PKGBUILD for carl-storm 14.28
# Maintainer: Matthias Volk <m.volk at utwente dot nl>
# Contributor: Masaki Waga <masakiwaga at gmail dot com>
pkgname=carl-storm
pkgver=14.28
pkgrel=1
pkgdesc="The Computer ARithmetic and Logic library for the probabilistic model checker Storm"
arch=(i686 x86_64)
url="https://github.com/moves-rwth/carl-storm"
license=('MIT')
depends=(boost cln eigen ginac gmp)
@MasWag
MasWag / ruby.org
Created July 12, 2024 22:23
ruby with org-mode

@@latex:\ruby{@@遠き神@@latex:}{、|、|、}@@

@MasWag
MasWag / add2_dynamic_binding.el
Last active July 4, 2024 11:48
A counterintuitive(?) behavior of dynamic binding demonstrated with Emacs Lisp
;; Static Binding
(setq lexical-binding t)
t
(defun addx (x)
(lambda (y) (+ x y)))
addx
(let ((add10 (addx 10))
(x 3))
(funcall add10 5)) ;; 10 + 5 = 15
15
@MasWag
MasWag / config-satysfi-ts-mode.el
Created February 28, 2024 06:18
A small configuration of satysfi-ts-mode + lsp-mode
(require 'package)
;;;; Add package-archives
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
;; Initialize
(package-initialize)
(require 'leaf)
(leaf satysfi-ts-mode
@MasWag
MasWag / copy-mastodon-uris-as-kill.el
Created February 23, 2024 04:14
Extract and copy Mastodon URIs to kill-ring
;;; copy-mastodon-uris-as-kill.el --- Extract and copy Mastodon URIs to kill-ring -*- lexical-binding:t -*-
;; Copyright (C) 2024 Masaki Waga
;; Maintainer: Masaki Waga
;; Keywords: Mastodon, social, kill-ring
;; This file is NOT a part of GNU Emacs.
;; This program is free software; you can redistribute it and/or modify
;; I use Ellama (https://github.com/s-kostyaev/ellama/) to streamline my interactions with LLM. Here's the configuration:
;;
;; Since Ellama relies on ollama (https://ollama.ai/) and its zephyr library (https://ollama.ai/library/zephyr) by default, you need to configure it externally. After downloading ollama, you can obtain zephyr with `ollama pull zephyr`.
(leaf ellama
:ensure t
:require t
:custom
;; I use C-c , as the prefix of ollama
(ellama-keymap-prefix . "C-c ,")