Skip to content

Instantly share code, notes, and snippets.

@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 ,")
@MasWag
MasWag / PKGBUILD
Created February 12, 2024 00:46
PKGBUILD for robodoc 4.99.44 with -Wno-error=format-security
# Maintainer: Geballin - Guillaume Ballin <macniaque at free dot fr>
pkgname=robodoc
pkgver=4.99.44
pkgrel=1
pkgdesc="ROBODoc is program documentation tool. It works with many programming languages: For instance C, Pascal, Shell Scripts, Assembler, COBOL, Occam, Postscript, Forth, Tcl/Tk, C++, Java -- basically any program in which you can use remarks/comments."
url="https://rfsber.home.xs4all.nl/Robo/"
arch=('x86_64' 'i686')
license=('GPLv3')
depends=()
optdepends=()
@MasWag
MasWag / run-ansible-playbook.el
Last active February 27, 2024 03:59
Run ansible-playbook with C-c C-c
(require 'leaf)
;; Define a customizable variable for the inventory file
(defcustom ansible-inventory-file "hosts"
"The default inventory file for ansible-playbook commands."
:type 'string
:group 'user)
(defcustom ansible-connection-password-file nil
"The file containing the password for the connection."
@MasWag
MasWag / make-audio-feed.sh
Created February 3, 2024 13:18 — forked from ivan/make-audio-feed.sh
Script to generate a Podcasts/Overcast-compatible RSS feed for audio files on your own web server
#!/usr/bin/env bash
# Generates an RSS feed for a list of audio files, for consumption by Overcast
# and other podcast players.
#
# Usage: make-audio-feed TITLE BASE_URL FILE...
# Example: (cd directory && make-audio-feed 'My Audio Files' 'https://your.server/directory/' * > .feed.rss)
set -eu -o pipefail