Skip to content

Instantly share code, notes, and snippets.

@tsupo
tsupo / pmDic.txt
Created May 14, 2009 09:27
sort in pokemon order
001 フシギダネ 固有名詞
002 フシギソウ 固有名詞
003 フシギバナ 固有名詞
004 ヒトカゲ 固有名詞
005 リザード 固有名詞
006 リザードン 固有名詞
007 ゼニガメ 固有名詞
008 カメール 固有名詞
009 カメックス 固有名詞
010 キャタピー 固有名詞
@tsupo
tsupo / jsort.c
Created May 14, 2009 09:40
sort in Japanese text order
/*
* jsort.c
* ひらがな文字列のソート(辞書の順による)
*
* by H. Tsujimura 11 Jan 1995 / 15 May 2009
*
* 使用方法:
* jsort [-t区切り文字] [+位置] [ファイル名]
* 指定された区切り文字で区切られた、指定位置の文字列を
* 基準にソートを行なう
@tsupo
tsupo / cut.c
Created May 14, 2009 09:43
cut
/*
* cut.c
*
* cut --- 行の中から指定フィールドを切り出す
*
* 形式
* (1) cut -c<フィールド> [filename ...]
* (2) cut -f<フィールド> [-d<セパレータ>] [-s]
* 機能
* (1) 空白文字(スペース)をフィールドの区切りとみなし、
@tsupo
tsupo / rmail2mbox.c
Created May 14, 2009 09:46
change RMAIL-formatted mail to mbox-formatted mail
/*
* change RMAIL-formatted mail to mbox-formatted mail
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char lineBuffer[200][BUFSIZ];
int line = 0;
@tsupo
tsupo / usagi.c
Created May 15, 2009 08:14
quiz client for 'USAGI'
/*
* usagi.c
* by H.Tsujimura 17 Sep 1993
*
* このusagi.cは、
* 加藤研児(http://www.vector.co.jp/vpack/browse/person/an003664.html)氏
* 作成のクイズ出題プログラムusagi.el(NEmacs上で動作するelispプログラム)用
* のクイズデータフォーマットのファイルを読み込み、クイズを出題、採点する
* ためのCプログラムである。
* NEmacsの動いていない環境でもusagi(うさぎ)を楽しみたいというのが、この
@tsupo
tsupo / decode.c
Created May 15, 2009 08:28
decode for MIME strings
/*
* decode for MIME strings (ISO-2022JP only)
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
static struct codeTable {
char code;
@tsupo
tsupo / encode.c
Created May 15, 2009 08:28
encode JIS 7bit kanji strings to MIME strings
/*
* encode JIS 7bit kanji strings to MIME strings (ISO-2022JP)
*/
#include <stdio.h>
static struct codeTable {
char code;
char key;
} codetbl[] = {
@tsupo
tsupo / OAuthBase.cs
Created May 15, 2009 08:45
OAuth library for C# (Twitter, Jaiku) [fork of http://oauth.googlecode.com/svn/code/csharp/OAuthBase.cs]
/* http://oauth.googlecode.com/svn/code/csharp/OAuthBase.cs */
using System;
using System.Security.Cryptography;
using System.Collections.Generic;
using System.Text;
using System.Web;
[assembly: Tumblen3.Revision("$Header: /Tumblen3.root/Tumblen3/Tumblen3/OAuthBase.cs 4 09/06/11 21:28 Tsujimura543 $")]
namespace OAuth
@tsupo
tsupo / hmac_sha256.c
Created May 15, 2009 12:21
HMAC-SHA256 written in C with OpenSSL 0.9.8k
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <openssl/x509.h>
#include <openssl/hmac.h>
void
hmac_sha256(
const unsigned char *text, /* pointer to data stream */
@tsupo
tsupo / magic
Created May 25, 2009 10:00
/usr/etc/magic
#
# @(#)magic 1.9 88/02/08 SMI; from S5R3.1 1.25
# @(#)magic 1.15 90/08/27 SMI; from S5R3.1 1.25
#ident "@(#)file:magic 1.13"
#
# file cmd's magic file
#
#
# Basically, the fields of this file are as follows:
# byte offset, value type, optional operator (= by default), value