Skip to content

Instantly share code, notes, and snippets.

View tobynet's full-sized avatar

tobynet tobynet

  • Toyama, Japan
View GitHub Profile
// ==UserScript==
// @name SBM Comments Viewer
// @namespace http://white.s151.xrea.com/wiki/index.php?script/SBMCommentsViewer
// @description Show social bookmark's comments at the bottom of your browser.
// @include *
// ==/UserScript==
/*
Last Modified: 2009.03.22 by TOBY
<?xml version="1.0" encoding="utf-8"?>
<FubConfig xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<WindowSetting>
<Left>611</Left>
<Top>51</Top>
<Width>1079</Width>
<Height>872</Height>
<Maximized>false</Maximized>
<PopupLeft>100</PopupLeft>
<PopupTop>100</PopupTop>
// ==UserScript==
// @name LDR with site thumbnail
// @namespace http://d.hatena.ne.jp/toby/
// @description Show feed thumbnail in Livedoor Reader(or fastladder)
// @include http://fastladder.com/reader/*
// @include http://reader.livedoor.com/reader/*
// @version 0.1
// ==/UserScript==
// referenced by http://la.ma.la/blog/diary_200610182325.htm
全角250文字(改行有り)
12345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890
**************************************************
全角250文字(改行なし)
12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890**************************************************
addBefore(Twitter, 'post', function(ps){
var pre_str = "見てる:";
if (ps.item) { ps.item = "『" + ps.item + "』"; }
ps.item = ps.item || "";
ps.description = ps.description ? ps.description : pre_str;
});
<?php
function phptemplate_pager_link($text, $page_new, $element, $parameters = array(), $attributes = array()) {
if ($text === t('next ›')) {
$attributes['rel'] = 'next';
} else if ($text === t('‹ previous')) {
$attributes['rel'] = 'prev';
}
return theme_pager_link($text, $page_new, $element, $parameters, $attributes);
}
@tobynet
tobynet / stdout_hook_singleton_method.rb
Created May 19, 2010 01:49
Rubyでaliasを使った特異メソッドの上書き方法
#!ruby -Ku
# override_method/stdout_hook_singleton_method.rb
$KCODE = 'u'
# sample of override singleton method
require "kconv"
$stdout.sync = true
class << $stdout
@tobynet
tobynet / stdout_hook_singleton_method_with_activesupport.rb
Created May 19, 2010 01:56
RailsのActiveSupportのalias_method_chainを使ったRubyでの特異メソッドの上書き方法
#!ruby -Ku
# override_method/stdout_hook_singleton_method_with_activesupport.rb
$KCODE = 'u'
# sample of override singleton method with active_supportlike a Rails
# alias_method_chain (ActiveSupport::CoreExtensions::Module) - APIdock
# http://apidock.com/rails/ActiveSupport/CoreExtensions/Module/alias_method_chain
require "rubygems"
require "active_support"
@tobynet
tobynet / web-old-days.js
Created July 7, 2010 14:47
web 1.0 jQuery plugin at 2010-04-01 aprilfool, originaled by sixapart
/*
* This program is distributed under the terms of the
* GNU General Public License, version 2.
*
*/
(function ($) {
/*
* cursorrat
*
// ==UserScript==
// @name pixiv API
// @namespace http://efcl.info/
// @include http://www.pixiv.net/*
// ==/UserScript==
// API 資料 http://pastie.org/735195
var pxvAPI = "http://iphone.pxv.jp/iphone/"
// 検索結果のオブジェクト
var result = [];
var user = {