Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / 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
@tsupo
tsupo / OAuthBase.cs
Created March 15, 2010 23:04
OAuth library for Twitter and Jaiku (Twitter's xAuth ready)
/* forked 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;
namespace OAuth
{
// ==UserScript==
// @name Favorize
// @namespace http://tyoro.orz.ne.jp/
// @description 色んな所にFavoritesの☆ボタンをつける。
// @include http://twitter.1x1.jp/*
// @include http://kichiku.oq.la/*
// @include http://twwatcher.blog20.fc2.com/*
// @include http://sho-ten.twitlife.jp/*
// @include http://search.twitter.com/*
// @include http://pcod.no-ip.org/yats/*
@tsupo
tsupo / testTest.html
Created February 15, 2011 11:02
sample html with test script for tumblen3 Version15Feb2011
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title>test page for Tumblen3</title>
</head>
<body>
<script type="text/javascript">