Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

KUOKA Yusuke mumoshu

🏠
Working from home
Block or report user

Report or block mumoshu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View serach-template-with-createcommand.ubiq.js
// 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(
View search-template-with-createcommand-method-post.ubiq.js
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 Jan 1, 2009
mhp2g-item.ubiquity.js
View gist:42293
// 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;
View webmail_notifier.mail.yahoo.co.jp.js
/***********************************************************
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"
View simple_naive_bayes_classifier.rb
require "forwardable"
module NaiveBayes
class Class
extend Forwardable
attr_reader :name
attr_accessor :frequency
def_delegators :@likelihood, :[], :[]=
View application_template_for_authlogic_basic_setup.rb
# -*- 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"
View application_template_for_authlogic_add_openid.rb
# -*- 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"
View various .emacs snippets
;; 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
View gist:250888
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._
View getClass method
function getClass(o) {
var res;
return o == null
? o === null ? "null" : "undefined"
: (res = o.constructor
.toString()
.match(/^function ([^\(]+)|object (\w+)/))
&& res[1] || res[2];
}
You can’t perform that action at this time.