Skip to content

Instantly share code, notes, and snippets.

View mumoshu's full-sized avatar
🏠
Working from home

Yusuke Kuoka mumoshu

🏠
Working from home
View GitHub Profile
// urlをプロパティ化した
// URLパラメータ文字列をUtils.paramsToString()で作るようにした
// executeをつけた
CmdUtils.CreateCommand({
name: "search-template-with-createcommand",
takes: {query: noun_arb_text},
url: "http://www.google.co.jp/search",
preview: function(pBlock, directObject) {
var query = directObject.text;
Utils.parseRemoteDocument(
CmdUtils.CreateCommand({
name: "search-template-with-createcommand",
takes: {query: noun_arb_text},
url: "http://www.google.co.jp/search",
preview: function(pBlock, directObject) {
var query = directObject.text;
Utils.parseRemoteDocument(
this.url,
{q: query},
function(doc) {
@mumoshu
mumoshu / gist:42293
Created January 1, 2009 15:09
mhp2g-item.ubiquity.js
// mhp2g-item.ubiquity.js
// 「MHP2:このアイテムが手に入るクエを教えて+何に使うか教えて」ツール
// http://www.first-priority.yi.org/~mezos/tool/
CmdUtils.CreateCommand({
name: "mhp2g-item",
takes: {query: noun_arb_text},
url: "http://www.first-priority.yi.org/~mezos/tool/itemlist.php?itemname=${itemname}",
preview: function(pBlock, directObject) {
var query = directObject.text;
var log = CmdUtils.log;
/***********************************************************
webmail_notifier.mail.yahoo.co.jp.js
***********************************************************/
function initHandler(handler){
handler.name="Yahoo! Japan";
handler.dataURL="http://mail.yahoo.co.jp/";
if(handler.user){
var ar=handler.user.split("@");
handler.loginData=["https://login.yahoo.co.jp/config/login?","login","passwd",
+"&.tries=1"
require "forwardable"
module NaiveBayes
class Class
extend Forwardable
attr_reader :name
attr_accessor :frequency
def_delegators :@likelihood, :[], :[]=
# -*- coding: utf-8 -*-
# at_authlogic_basic_setup.rb
#
# See also:
# http://m.onkey.org/2008/12/4/rails-templates
# http://www.binarylogic.com/2008/11/3/tutorial-authlogic-basic-setup
# 1. Install Authlogic
plugin "authlogic", :git => "git://github.com/binarylogic/authlogic.git"
# -*- coding: utf-8 -*-
# at_authlogic_openid.rb
#
# See also:
# http://m.onkey.org/2008/12/4/rails-templates
# http://www.binarylogic.com/2009/3/30/authlogic-2-0-with-some-openid-goodness/
# http://d.hatena.ne.jp/mothprog/20090404/1238810821
# 1. Install gems.
gem "ruby-openid", :lib => "openid"
;; scala-mode
(add-to-list 'load-path "/usr/local/share/scala-2.7.7.final/misc/scala-tool-support/emacs/")
(require 'scala-mode-auto)
;; Ubuntu 9.10 on VMWare Player 3でフォントが巨大になってしまう不具合対処用
(when window-system
(progn
http://groups.google.com/group/simple-build-tool/browse_thread/thread/c15d5d6430513915#
*** だめなプロジェクト(java.lang.NoSuchMethodError: javax.servlet.http.Cookie.setHttpOnly(Z)Vになる)
> console-project
[info] Starting scala interpreter with project definition step ...
[info]
current: StepProject = Project step
import sbt._
import Process._
function getClass(o) {
var res;
return o == null
? o === null ? "null" : "undefined"
: (res = o.constructor
.toString()
.match(/^function ([^\(]+)|object (\w+)/))
&& res[1] || res[2];
}