Skip to content

Instantly share code, notes, and snippets.

@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 / 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()); }
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 / 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();
}
@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 / 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
(function(){
var total = {};
var year = '2012';
var all = false;
function init(num) {
if(typeof num !== 'number') {
num = 0;
$('<div/>').css({
position: 'fixed',
left: 0,
@tarchan
tarchan / repost.js
Last active December 19, 2015 08:19
コメント付きでURLを投稿します。
(function(){
var link = location.href;
var title = window.getSelection() + '' || document.title;
//var text = window.getSelection();
var quote = title + ' ' + link + ' ';
//var total = {};
//var year = '2012';
//var all = false;
var nick = 'たーちゃん';
function init() {
@tarchan
tarchan / jsdoit.css
Created September 2, 2013 05:37
forked: 艦これ ウィークリー任務カウンター
.quest {
position:relative;
margin:10px ;
}
.content {
}
.title {
font-size:16px;

Untitled Slide

Welcome to Glide.

Glide is the easiest way to create useful slide for all of your Gists.

  • input key <- to go backward.
  • input key -> to go forward.

Publishing