Skip to content

Instantly share code, notes, and snippets.

@tsupo
tsupo / autoClose.cpp
Created February 18, 2011 07:03
Internet Explorer の JavaScript のエラーダイアログを自動的に閉じる
/*
* Internet Explorer の JavaScript のエラーダイアログを自動的に閉じる
* written by Hiroshi Tsujimura 18 Feb 2011 / 22 Feb 2011
*/
#include <windows.h>
#include <stdio.h>
volatile bool cont = true;
HWND parent = NULL;
@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">
// ==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 / 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
{
@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 / 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 / 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 / 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 / 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(うさぎ)を楽しみたいというのが、この