Skip to content

Instantly share code, notes, and snippets.

@tarchan
tarchan / eclipse.ini
Created July 17, 2012 04:29
pleiades-e4.2-ultimate-32bit-jre_20120716の設定ファイル
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256m
@tarchan
tarchan / translation-playclipse.properties
Created July 16, 2012 05:53
Playclipse 日本語訳プロパティー
###################################################################################################
#
# Copyright (c) 2012 tarchan. All rights reserved.
# This program and the accompanying materials except for /lib directory are
# made available under the terms of the Eclipse Public License v1.0 which
# accompanies this distribution, and is available at /epl-v10.html.
#
###################################################################################################
#
@tarchan
tarchan / showtime.js
Created July 12, 2011 13:11
10分ごとに時報を流すスクリプトです。
var interval = 10 * 60 * 1000; // 10分
var where = '#limechat';
function setTimeout(func, time)
{
println("タイマーを開始します。: " + time);
java.lang.Thread.sleep(time);
func();
}
final HttpRequest req = new HttpRequest();
req.addOnReadyStateChangedListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
if (evt.getNewValue() == ReadyState.LOADED) {
String response = req.getResponseText();
//do what you like with the response here
//for example, if the XML was XMLDecoder
//compatible:
java.beans.XMLDecoder decoder = new java.beans.XMLDecoder(
new ByteArrayInputStream(response.getBytes()));
@tarchan
tarchan / run.js
Created July 12, 2011 05:59
JavaScriptでRunnableインタフェースを実装
function run() { println('run called'); }
function add(a, b) { return a + b; }
function actionPerformed(e) { println('run action: ' + e.getActionCommand()); }
@tarchan
tarchan / openfile.js
Created July 12, 2011 05:28
JavaScriptからローカルファイルを読み込む
importPackage(java.io);
function openFile(name)
{
var file = new BufferedReader(new FileReader(name));
return file;
}
var file = openFile("userscript/openfile.js");
var line;
@tarchan
tarchan / google.js
Created July 12, 2011 01:49
LimeChatでGoogle検索する
// gede99 @ http://pen2.com/google/
var version = "google.js v0.05";
//
var chList = new Array();
var chListFile = "google_chlist.txt";
var entity = {"ne":8800,"le":8804,"para":182,"xi":958,"darr":8595,"nu":957,"oacute":243,"Uacute":218,"omega":969,"prime":8242,"pound":163,"igrave":236,"thorn":254,"forall":8704,"emsp":8195,"lowast":8727,"brvbar":166,"alefsym":8501,"nbsp":160,"delta":948,"clubs":9827,"lArr":8656,"Omega":937,"quot":34,"Auml":196,"cedil":184,"and":8743,"plusmn":177,"ge":8805,"raquo":187,"uml":168,"equiv":8801,"laquo":171,"Epsilon":917,"rdquo":8221,"divide":247,"fnof":402,"chi":967,"Dagger":8225,"iacute":237,"rceil":8969,"sigma":963,"Oslash":216,"acute":180,"frac34":190,"upsih":978,"lrm":8206,"Scaron":352,"part":8706,"exist":8707,"nabla":8711,"image":8465,"prop":8733,"omicron":959,"zwj":8205,"gt":62,"aacute":225,"Yuml":376,"Yacute":221,"weierp":8472,"rsquo":8217,"otimes":8855,"kappa":954,"thetasym":977,"harr":8596,"Ouml":214,"Iota":921,"ograve":242,"sdot":8901,"copy":169,"oplus":8853,"acirc":226,
@tarchan
tarchan / jframe.js
Created July 12, 2011 01:45
JavaScriptでSwingのウインドウを表示する
importPackage(javax.swing);
frame = new JFrame("sample");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(400, 300);
frame.setLocationByPlatform(true);
frame.setVisible(true);
@tarchan
tarchan / sort_css_property.pl
Created April 8, 2010 05:20 — forked from xaicron/sort_css_property.pl
CSSのプロパティをソートするPerlスクリプト
#!/usr/bin/perl
# Author: Kyo Nagashima <[email protected]>, http://hail2u.net/
# License: MIT license (http://opensource.org/licenses/mit-license.php)
# Modified: 2009-11-14T12:24:54+09:00
# Updated: xaicron (http://blog.livedoor.jp/xaicron/)
use strict;
use warnings;
@tarchan
tarchan / 外部スクリプトを読み込む
Created October 28, 2009 01:40
引数で指定したJavaScriptを順番に読み込みます。
javascript:(function(a,s){s=document.createElement('script');s.charset='UTF-8';s.type='text/javascript';s.src=a.shift();document.body.appendChild(s);if(a.length)arguments.callee(a);})(['http://ss-o.net/userjs/minibuffer.safari.user.js','http://ss-o.net/userjs/oAutoPagerize.js','http://ss-o.net/userjs/ldrize.safari.user.js']);