This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby1.9 | |
# encoding: utf-8 | |
require 'cgi' | |
require 'open-uri' | |
require 'rubygems' | |
require 'nokogiri' | |
require 'pit' | |
appid = Pit.get('ydn', :require => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby1.9 | |
require 'rubygems' | |
require 'pit' | |
require 'nokogiri' | |
require 'mechanize' | |
config = Pit.get('sapica', :require => { | |
'cardid' => 'your card id', | |
'password' => 'your password' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
i = 0 | |
founds = 0 | |
begin | |
i += 1 | |
sq = i ** 2 | |
digits = Math.log10(sq).to_i + 1 | |
next if digits % 2 == 1 | |
m = 10**(digits/2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
makeSearchCommand({ | |
name: "friendfeed-search", | |
url: "http://friendfeed.com/search?q={QUERY}", | |
icon: "http://friendfeed.com/favicon.ico", | |
description: "Searches <a href=\"http://friendfeed.com\">FriendFeed</a> for your words." | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name gist-ubiquitifier | |
// @namespace http://d.hatena.ne.jp/darashi | |
// @description adds link to Gist Ubiquitifier on gist | |
// @include http://gist.github.com/* | |
// @include https://gist.github.com/* | |
// @version 0.0.0 | |
// ==/UserScript== | |
var target = document.getElementById("gist_meta"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function SBM() {} | |
SBM.prototype = { | |
initialize : function(pblock, url) { | |
this._pblock = pblock; | |
this._url = url; | |
this._div_id = this._id + "-results"; | |
}, | |
displayResult : function(result) { | |
jQuery("#"+this._div_id, this._pblock)[0].innerHTML = result ? | |
result : "no bookmarks with comment"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
makeSearchCommand({ | |
name: "buzztter", | |
url: "http://buzztter.com/ja/k/{QUERY}", | |
icon: "http://buzztter.com/favicon.ico", | |
description: "Searches <a href=\"http://buzztter.com/ja/\">buzztter (in Japanese)</a> for your words.", | |
preview: function(pblock, directObject){ | |
var searchTerm = directObject.text; | |
var pTemplate = "Searches <a href=\"http://buzztter.com/ja/\">buzztter (in Japanese)</a> for <b>${query}</b>."; | |
var pData = {query: searchTerm}; | |
pblock.innerHTML = CmdUtils.renderTemplate(pTemplate, pData); |
NewerOlder