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
import static org.hamcrest.Matchers.*; | |
import static org.junit.Assert.*; | |
import static org.mockito.Mockito.*; | |
import java.lang.reflect.InvocationHandler; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import java.lang.reflect.Proxy; | |
import java.util.Map; |
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 | |
# this script based on http://d.hatena.ne.jp/shibason/20090802/1249204953 | |
require 'rubygems' | |
require 'pit' | |
require 'oauth' | |
print 'Pit name: ' | |
pit_name=gets.chomp.strip |
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 atnd-user-link | |
// @namespace http://d.hatena.ne.jp/gnarl/ | |
// @include http://atnd.org/events/* | |
// ==/UserScript== | |
(function() { | |
function external_link_of(icon_url,user_name) { | |
if(/wwwhatena/.exec(icon_url)) { | |
return 'http://www.hatena.ne.jp/'+user_name; |
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
require 'rubygems' | |
require 'uri' | |
require 'net/http' | |
require 'nokogiri' | |
class Corpse | |
def initialize(uri=URI.parse('http://theoria.s284.xrea.com/corpse/index.html')) | |
@uri=uri | |
@contents=nil | |
end |
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 redmine_set_default_values_on_new_ticket | |
// @namespace http://d.hatena.ne.jp/gnarl/ | |
// @include */issues/new* | |
// ==/UserScript== | |
(function() { | |
var SET_ASSIGNED_TO_IF_ONLY_ONE_USER=true; | |
var DEFAULT_TRACKER='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
1.upto(100){|i|puts i%3>0?i%5<1?:Buzz:i:i%5>0?:Fizz:'FizzBuzz'} |
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
let s:color='#ff0000' | |
function! s:fire() | |
if s:color == '#ff0000' | |
let s:color = '#0000ff' | |
elseif s:color == '#0000ff' | |
let s:color = '#00ff00' | |
elseif s:color == '#00ff00' | |
let s:color = '#ff0000' | |
endif |
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
# Twitのお気に入りIDタブをlistと同期させる | |
# 使用法 | |
# - リストと同期したいお気に入りIDタブの名前を list:リスト名 にする | |
# - Twitを終了する | |
# - このファイルをTwitのインストールフォルダに置き、実行するとリストがTwitに反映される | |
# - Twitを再起動 | |
# | |
# 依存gem: Pit,twitter | |
# Pitに、'ユーザ名@twitter'という名前で以下の項目を登録しとく必要がある(てきとうにがんばってください) | |
# - consumer_token |
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
require 'win32ole' | |
require 'kconv' | |
module Excel | |
class OLEWrapper | |
def initialize obj | |
@obj=obj | |
end | |
def raw_obj | |
@obj |
OlderNewer