This file contains hidden or 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
addBatch(new Batch("hogehoge",new Batch.Serial() {{ | |
add(HogeJob.class); | |
add(FugaJob.class); | |
add(new Batch.Parallel() {{ | |
add(FooJob.class); | |
add(BarJob.class); | |
}}; | |
}}); |
This file contains hidden or 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
public enum NamedParam { | |
A(new Param1(1), new Param2("hoge")), B(new Param1(10), new Param2("fuga")); | |
X(Param1 p1, Param2 p2) { | |
this.p1 = p1.value; | |
this.p2 = p2.value; | |
} | |
public final int p1; | |
public final String p2; |
This file contains hidden or 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
#!/bin/sh | |
set -e | |
PREFIX="from now" | |
MESSAGE="[${PREFIX}] `date`" | |
if [ $# -eq 0 ] | |
then | |
git add -u |
This file contains hidden or 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
/* This program is free software. It comes without any warranty, to | |
* the extent permitted by applicable law. You can redistribute it | |
* and/or modify it under the terms of the Do What The Fuck You Want | |
* To Public License, Version 2, as published by Sam Hocevar. See | |
* http://sam.zoy.org/wtfpl/COPYING for more details. */ | |
/** | |
* 明示的な開放が必要なリソースクラスが使用する。 | |
* | |
* finalizeメソッドにより、開放されていないリソースがあった場合標準エラー出力に警告を出す。 |
This file contains hidden or 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 |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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'; |