Skip to content

Instantly share code, notes, and snippets.

View KusaReMKN's full-sized avatar
🍊
Mikan-chan is always watching you...

KusaReMKN KusaReMKN

🍊
Mikan-chan is always watching you...
View GitHub Profile
@KusaReMKN
KusaReMKN / Z84C015.ASM
Created April 13, 2024 07:53
秋月の ROM ライターキットの取扱説明書に載っているテンプレートプログラム
;********************************
;Z84C015専用セットアップ
;********************************
;AKI80のスタートアップアセンブラです。
;アセンブラのヘッダファイルとして使用ください。
;
DBUG: EQU 0000H ;REMORT DBUG時には8000Hに変更
;
; パラレルポートI/Oアドレスセット
PIOA: EQU 1CH ;Aポートデータ
@KusaReMKN
KusaReMKN / custom-annotation.scm
Created December 3, 2023 04:37
my uim custom settings (~/.uim.d/customs/*)
(define skk-show-annotation? #t)
(define skk-show-annotation-in-preedit? #f)
(define enable-annotation? #t)
(define annotation-agent 'eb)
(define eb-enable-for-annotation? #f)
(define annotation-eb-dic-path "/usr/share/dict")
(define annotation-dict-server "dict.org")
(define annotation-dict-servname 2628)
(define annotation-dict-database "web1913")
(define annotation-dict-cache-words 256)
@KusaReMKN
KusaReMKN / getline.ino
Created May 9, 2023 22:10
シリアル通信から一行読み込む (Arduino)
static char *
GetLine(char *buf, int len)
{
register int i;
for (i = 0; i < len-1; i++) {
while ((buf[i] = Serial.read()) == -1);
if (buf[i] == '\r')
break;
}
@KusaReMKN
KusaReMKN / fa_p.sh
Last active April 23, 2023 03:52
考える余地を与えずに爆速で FreeBSD+Apache24+PHP82 な環境を構築する
#! /bin/sh
set -evx
if [ "$(uname)" != "FreeBSD" ]
then
echo "This script must be run on FreeBSD." >&2
exit 1
fi
@KusaReMKN
KusaReMKN / bom.3
Last active April 22, 2023 09:10
UTF-8 なファイルにある愚かな BOM を調べる、読み飛ばす
.Dd 22nd April 2023
.Os
.Dt BOM 3
.Sh 名称
.Nm hasBOM ,
.Nm skipBOM
.Nd UTF-8 なファイルにある愚かな BOM を調べる、読み飛ばす
.
.Sh ライブラリ
.Lb libc
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>mandelbrot</title>
<style>
body {
width: 80%;
margin: 1rem auto;
text-align: center;
@KusaReMKN
KusaReMKN / DISKDUMP.C
Created March 15, 2023 12:36
粗大ゴミ(DEBUG コマンドと連携してフロッピーのディスクイメージを作ろうとしたもの)
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define BLOCK_SIZE 512
#define SECTOR_READ 64
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GPS Test</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@latest/dist/leaflet.css">
<script async defer src="https://unpkg.com/leaflet@latest/dist/leaflet.js"></script>
<style>
#map { position: absolute; top: 0; bottom: 3rem; left: 0; right: 0; }
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define RLX_VER '1'
#define RUN 0xFF
typedef struct {
char filename[16];
unsigned char chksum;
#include <stdio.h>
int main(void)
{
// char szNum1[256], szNum2[256];
int iNum1, iNum2, m, n, k, l;
printf("Num1 Num2>");
scanf("%i %i", &iNum1, &iNum2);
m = iNum1;
n = iNum2;