Skip to content

Instantly share code, notes, and snippets.

@obono
obono / bespoke-svg-exporter.js
Last active April 11, 2023 14:10
A bespoke SVG exporter to JPEG or PNG
/*
* Bespoke SVG exporter
*
* Copyright (c) 2023 OBONO
*
* Released under the MIT license.
* see https://opensource.org/licenses/MIT
*/
const { XMLParser, XMLBuilder } = require('fast-xml-parser');
@obono
obono / cglpM5Stack.ino
Created October 27, 2022 13:17
A port of ino file for crisp-game-lib-portable on M5Stack Basic
#define LGFX_AUTODETECT
#define LGFX_USE_V1
#include <LGFX_AUTODETECT.hpp>
#include <LovyanGFX.hpp>
#define _M5DISPLAY_H_
class M5Display {};
#include <M5Stack.h>
#include <float.h>
@obono
obono / thumby.py
Last active June 13, 2023 21:12
A substitute for Thumby library using pyxel
# Thumby Simulator
#
# Copyright (c) 2022 OBONO
#
# Released under the MIT license.
# see https://opensource.org/licenses/MIT
import math
import os
import pyxel
@obono
obono / kawakudari_tuned.html
Last active June 20, 2021 15:14
Tuned "Kawakudari" game using crisp-game-lib
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width">
<title>kawakudari tuned</title>
<script type="module">
import { onLoad, ticks, input, end, vec, rnd, addScore, remove, text, play } from "https://taisukef.github.io/crisp-game-lib/es/main.js";
window.title = "kawakudari tuned";
window.description = `
[Hold]
move to right
`;
@obono
obono / ATtiny85FootPedal.ino
Last active April 13, 2021 15:57
A foot pedal using ATtiny85 as HID keyboard device.
/**
* ATtiny85FootPedal
*
* Copyright (c) 2021 OBONO
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@obono
obono / IchigoJamDataConverter.go
Last active December 3, 2020 07:46
Data converter for IchigoJam
/*
* Copyright (c) 2020 OBONO
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@obono
obono / keymap.c
Last active January 10, 2020 17:40
My customized keymap for "素 - shiro".
/* Copyright 2019 T.Shinohara
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@obono
obono / rpi2_ssd1306.py
Last active July 5, 2019 01:25
Display something on SSD1306 when the button is pressed on Raspberry Pi 2.
#!/usr/bin/env python3
# Copyright (c) 2019 OBONO
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
/*
* Copyright (c) 2019 OBONO
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@obono
obono / ArduboyPlaytunesSimulator.html
Last active October 9, 2019 13:10
Audio simulation tool for Arduboy (TM)
<!DOCTYPE html>
<html lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ArduboyPlaytune Simulator</title>
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/cQBeAEgAPACPAHcAf8D/AMAAQAD/wP8AT3ifANVAfwBAYIAAMEhgAF+QvwC/AJ8A6oC/AAAAAAAAAAAAAAAAAABVVQAAtAACJdZlAABEwhNWhVUAAAAAAFVVZVAAAAHMxWZmUAAAAAAFXYUAABwhzFZmZQAEQAAAVVaFgAtACnRHVdXVAAAAAAAAUFAAAAtERLAAAAAAAAqgAAAAAAlEeqdEkAAAAAAAAAAAAAAJRHqnRJAAAAAAAAAAAADPwwAAhAEAAIABAADAAQAA+AEAAMADAACAAQAAAAAAAAgAAACQAQAA8A8AAOAHAADAAwAAwAMAAMADAADhhwAA">
<style type="text/css">
.note {