Skip to content

Instantly share code, notes, and snippets.

@tsupo
tsupo / favorize.user.js
Created May 7, 2009 18:10
favorize for Twitter users
// ==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 / tithi.txt
Created May 7, 2009 18:14
Indian Calendar
Margashirsh 2001
15.12 2001 05:47:23 JST 1. Pratipat Shukla paksha
16.12 2001 05:52:32 JST 2. Dvitiya Shukla paksha
17.12 2001 06:31:23 JST 3. Tritiya Shukla paksha
18.12 2001 07:44:32 JST 4. Chaturthi Shukla paksha
19.12 2001 09:29:42 JST 5. Panchami Shukla paksha
20.12 2001 11:41:07 JST 6. Shashti Shukla paksha
21.12 2001 14:09:28 JST 7. Saptami Shukla paksha
22.12 2001 16:42:27 JST 8. Ashtami Shukla paksha
@tsupo
tsupo / sekki.txt
Created May 7, 2009 18:17
24 sekkis and some special days in seasons
1870/ 1/ 5, 小寒
1870/ 1/20, 大寒
1870/ 2/ 4, 立春
1870/ 2/19, 雨水
1870/ 3/ 6, 啓蟄
1870/ 3/21, 春分
1870/ 4/ 5, 清明
1870/ 4/20, 穀雨
1870/ 5/ 6, 立夏
1870/ 5/21, 小満
@tsupo
tsupo / kpp.c
Created May 7, 2009 20:40
Kanji Preprocessor for C compiler
/*
* KANJI preprocessor for C compiler not supported WIDE CHAR
* written by H.Tsujimura 12 Jan 1999
* modified 20 Dec 1999
*
* kpp.c
*/
#include <stdio.h>
#include <stdlib.h>
@tsupo
tsupo / convIsbn.js
Created May 8, 2009 18:43
covert code between ISBN10 and ISBN13
/* convISBN.js : converter ISBN10 <-> ISBN13 */
/* Copyright (c) 2007 by H.Tsujimura <[email protected]> */
/* Distributed by LGPL. */
/* this script written by H.Tsujimura 20 Jan 2007 */
function convISBN13toISBN10(str) {
var s;
var c;
var checkDigit = 0;
var result = "";
@tsupo
tsupo / repAmazon.js
Created May 8, 2009 18:46
replace image to 'no-image-exists' image of Amazon item, if not exists image of this item
/*
* Amazon の商品画像があればそのまま表示し、なければ「画像がありません画像」を
* 表示するスクリプト
*
* written by H.Tsujimura 2005, 2006, 2007
*/
/* img の onload に replaceImage を埋め込む必要があるバージョン */
/* → いずれ、この replaceImage は廃止し、replaceImageForAmazon に移行する */
function replaceImage(img,rep_img) {
@tsupo
tsupo / extedit.js
Created May 8, 2009 18:53
to use your favorite text-editor on Web forms
<script type="text/javascript">
/*
$Id: extedit.js,v 1.6.1.1 2004/04/05 07:04:05 tsupo Exp $
#Id: extedit.js,v 1.6 2004/03/28 17:41:49 ishinao Exp $
Author: ishinao <[email protected]>
Licence: GPL
extedit - Webブラウザの入力フォームで好きなエディタを使う
see http://mylog.ishinao.net/id/1177
*/
--- a/32521.user.js Wed Sep 10 18:50:36 2008
+++ b/32521.user.js Tue Jan 13 16:11:19 2009
@@ -14,8 +14,10 @@
(function() {
// Config
- var afterElementXPath = 'id("entrylist")/following-sibling::*[1]';
- var urlElementXPath = 'id("entrylink_url")//a';
+ // var afterElementXPath = 'id("entrylist")/following-sibling::*[1]';
+ var afterElementXPath = 'id("moreinfo_bottom")/following-sibling::*[1]';
@tsupo
tsupo / 8551.user.js
Created May 12, 2009 13:45
autopagerize for IE-component-based browsers (based autopagerise 0.0.31 from http://userscripts.org/scripts/show/8551) related http://github.com/swdyh/autopagerize/tree/master
// ==UserScript==
// @name AutoPagerize for IE7 with Turnabout
// @namespace http://watcher.moe-nifty.com/
// @description loading next page and inserting into current page.
// @include http://*
// @include https://*
// @exclude https://mail.google.com/*
// ==/UserScript==
//
// auther: tsupo http://watcher.moe-nifty.com/
@tsupo
tsupo / rand.cpp
Created May 14, 2009 09:09
(初音ミクに歌ってもらうための)乱数歌詞を生成する
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
static char str[][5] = {
"あ", "い", "う", "え", "お", "か", "き", "く", "け", "こ",
"さ", "し", "す", "せ", "そ", "た", "ち", "つ", "て", "と",
"な", "に", "ぬ", "ね", "の", "は", "ひ", "ふ", "へ", "ほ",
"ま", "み", "む", "め", "も", "や", "ゆ", "よ", "ら", "り",
"る", "れ", "ろ", "わ", "を", "ん",