Skip to content

Instantly share code, notes, and snippets.

import javax.swing.*;
import wiiremotej.*;
import wiiremotej.event.*;
import javax.sound.sampled.*;
import java.io.*;
public class WiiSample1 {
#!/usr/bin/ruby
LOCALE_DIR = "/usr/share/locale/ja/"
LC_MESSAGES = LOCALE_DIR + "LC_MESSAGES/"
def mo2po files
files.each do |name|
puts name
system "msgunfmt #{LC_MESSAGES + name}.mo -o #{name}.po"
require "rubygems"
require "rack"
include Rack
class VerySmallHttpd
def get_path env
paths = env["PATH_INFO"].split("/")
path = (paths.empty?) ? nil : paths[1]
end
require "rubygems"
require "mechanize"
require "readline"
require "Kconv"
ICONS = ["fate.png", "nanoha.png"]
URL = 'http://www.twitter.com/'
=begin
require "rubygems"
require "mechanize"
require "readline"
require "Kconv"
URL = 'http://www.twitter.com/'
KCODE = 'u'
class Twitter
def login name, password, proxy
require "scanner.rb"
class ParseException < Exception
end
class Parser
def initialize input = nil
@sc = Scanner.new(input) unless input == nil
(setq load-path (cons (expand-file-name "~/.emacs.d/elisp/") load-path))
;; 文字コード
(set-language-environment "Japanese")
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cn.orz.pascal</groupId>
<artifactId>example</artifactId>
<packaging>war</packaging>
<version>1.3.4</version>
<!-- TODO project name -->
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import com.meterware.httpunit.*;
public class TwitterAPI {
private WebConversation wc;
public TwitterAPI() throws Exception {
@koduki
koduki / vshd.rb
Created September 10, 2008 13:21
#!/opt/local/bin/ruby
require "rubygems"
require "rack"
include Rack
class VerySmallHttpd
def get_path env
paths = env["PATH_INFO"].split("/")