Skip to content

Instantly share code, notes, and snippets.

uname -a
Linux colinux 2.6.33.7-co-0.7.9 #1 PREEMPT Sat Apr 9 20:30:51 UTC 2011 i686 GNU/Linux
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 8 2014 09:55:01)
Included patches: 1-192
Compiled by deton@colinux
Huge version without GUI. Features included (+) or not (-):
+acl +farsi +mouse_netterm +syntax
+arabic +file_in_path +mouse_sgr +tag_binary
@deton
deton / LDOCE5.map
Last active August 29, 2015 14:10
EBWin用外字定義ファイル。ロングマン現代英英辞典5訂版
ha121 u014b
ha122 u00ca
ha123 u2033
ha124 u00ec
ha125 u2212
ha126 u02cc
ha127 u00fa
ha128 u00fc
ha129 u01c1
ha12a - # ue003 not a valid unicode character
@deton
deton / bdf2fontx.c.support-ankfont.patch
Last active August 29, 2015 14:25
bdf2fontx.cをANKフォント対応するパッチ
--- bdf2fontx.c.orig 2001-12-07 01:51:03.000000000 +0900
+++ bdf2fontx.c 2015-07-20 14:52:11.000000000 +0900
@@ -106,6 +106,9 @@ void bdfheader(char *name, int *width, i
else if (match(coding, "jisx0208") == 0) {
*type = 1;
}
+ else {
+ *type = 0;
+ }
break;
@deton
deton / bdfunicode2jis.pl
Created July 26, 2015 05:13
iso10646(unicode)のBDFフォントから、jisx0208またはjisx0201のBDFフォントを生成するスクリプト
#!/usr/bin/perl
# make jisx0208 or jisx0201 BDF font file from iso10646(unicode) BDF font file.
use strict;
use warnings;
use Encode;
# from cp932_roundtrip
sub encode_ {
my $unicode = $_[0];
if (#(0xe000 <= $unicode && $unicode <= 0xf8ff) || # private use area
@deton
deton / bdf2fontx.c.fix-noendchar.patch
Last active August 29, 2015 14:25
bdf2fontx.cでno ENDCHARになる問題の修正パッチ。BITMAP内の行数はBBX行のheightを使用
diff --git a/bdf2fontx.c b/bdf2fontx.c
index 816cfa6..b40a9a4 100644
--- a/bdf2fontx.c
+++ b/bdf2fontx.c
@@ -85,19 +85,20 @@ int match(char *s, char *t)
"FONT -%[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]--%d-%*d-%*d-%*d-%*[^-]-%d-%[^-]-%*s"
/* jis fixed medium r normal 14 130 75 75 C 70 jisx0201 */
-void bdfheader(char *name, int *width, int *height, int *type)
+void bdfheader(char *name, int *width, int *height, int *type, int *xoffset, int *yoffset)
@deton
deton / bbtrackball.ino
Last active March 19, 2017 02:12
Use "SparkFun Blackberry Trackballer Breakout" as trackball for ATmega32U4
// SparkFun Blackberry Trackballer Breakout
// https://www.switch-science.com/catalog/2276/
#define DEBUG 0
#define Lft 3
#define Rht 2
#define Up 0
#define Dwn 1
@deton
deton / key2pin
Created March 19, 2017 06:03
改造版ミニキーボードのキーマトリックス配線情報
esc P22 P17
1 P22 P23
2 P16 P23
3 P18 P23
4 P15 P23
5 P15 P20
6 P19 P20
7 P19 P23
8 P12 P23
9 P14 P23
@deton
deton / .uim
Created April 8, 2017 02:29
uim-tutcodeで後置型かな漢字変換(連続するひらがなを対象に最長一致)
(define uim-pref-suppress-dot-uim-warning-dialog? #t)
(require "tutcode.scm")
;;; 後置型かな漢字変換を開始する
;;; cf. tutcode-begin-postfix-mazegaki-conversion
(define (tutcode-postfix-kana2kanji-conversion state pc)
(tutcode-context-set-mazegaki-yomi-len-specified! pc 0)
(let*
((former-seq (tutcode-postfix-katakana-acquire-yomi pc #f)) ; 連続するかな
(former-len (length former-seq)))
(and
@deton
deton / usbaltkey.ino
Created April 23, 2017 10:38
USB Alt key
// alt key
// cf. http://qiita.com/MergeCells/items/17bdc1c1fb35949195b5
#define Btn1 2
void setup() {
pinMode(Btn1, INPUT_PULLUP);
Keyboard.begin();
}
void loop() {
@deton
deton / dot.screenrc
Last active July 17, 2017 00:56
GNU screenで継続行をコピーする際に、`\`等を除く方法
bind g command -c buffilt
bind -c buffilt \\ eval writebuf screen 'stuff "scrbuf.sh rmwrap-emacs&&exit^M"'
bind -c buffilt > eval writebuf screen 'stuff "scrbuf.sh rmwrap-vim&&exit^M"'
bind -c buffilt + eval writebuf screen 'stuff "scrbuf.sh rmwrap-mutt&&exit^M"'
bind -c buffilt ^E eval writebuf screen 'stuff "scrbuf.sh rmwrap-width&&exit^M"'
bind -c buffilt $ eval writebuf screen 'stuff "scrbuf.sh picklastarg&&exit^M"'
bind -c buffilt ' ' eval writebuf screen 'stuff "scrbuf.sh join-with-blank&&exit^M"'
bind -c buffilt e eval writebuf screen 'stuff "scrbuf.sh edit&&exit^M"'
bind -c buffilt g eval writebuf screen 'stuff "scrbuf.sh grep2l&&exit^M"'
bind -c buffilt h eval writebuf screen 'stuff "scrbuf.sh rmhtmltag&&exit^M"'