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
--- url_hinter.rb 2015-09-04 10:39:08.000000000 +0900 | |
+++ url_hinter.rb.bak 2015-09-04 10:38:52.000000000 +0900 | |
@@ -359,10 +359,10 @@ | |
end | |
def has_url? | |
- !/https?:\/\/[^ \(\)\r\n]*/.match(remove_color_message).nil? | |
+ !/https?:\/\/[^ \(\)\r\n]*/.match(remove_color_message.force_encoding("UTF-8")).nil? | |
end |
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
http://www.slideshare.net/sleepy_yoshi/erlang-1 を見る | |
c(normal). | |
Pid = normal:start_stack(). | |
normal:get_stack(Pid). | |
normal:push(Pid, hoge). |
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/bash | |
while getopts rh:d OPT | |
do | |
case $OPT in | |
"r" ) FLG_R="TRUE" ;; | |
"h" ) FLG_H="TRUE" ; host="$OPTARG" ;; | |
"d" ) FLG_D="TRUE" ;; | |
esac | |
done |
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/bash | |
# PLUGINS=で始まってる行をコメントアウトしたり追加したりして、 | |
# 好きなプラグインをインストールできるよ。 | |
# まぁ、普通は、JenkinsのWeb UIから「プラグインの管理」でインストールすればいいと思う。 | |
# 同じ環境を何個も作りたい場合はこのスクリプトをどうぞ。 | |
PLUGINS=() | |
# Jenkin Build Pipeline Plugin |
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
function is_anime(){ | |
local image=$1 | |
image_count=`identify $image | wc -l` | |
if [ $image_count -gt 1 ]; then | |
return 0 | |
else | |
return 1 | |
fi | |
} |
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
usage(){ | |
echo $0 directory all_icon_image | |
} | |
function is_anime(){ | |
local image=$1 | |
image_count=`identify $image | wc -l` | |
if [ $image_count -gt 1 ]; then | |
return 0 | |
else |
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
is_first=true | |
if $is_first; then | |
# do something | |
is_first=false | |
fi |
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
function log_output(){ | |
local LEVEL=$1 | |
shift | |
local MESSAGE=$@ | |
echo `date '+%Y/%m/%d/%H:%M:%S'` `hostname` `basename $0` $$ \($LEVEL\) $MESSAGE | |
} |
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
db :: [(String, [(String, String)])] | |
db = [("alice", [("title", "Ms."), ("job", "sales")]), | |
("bob", [("title", "Mr."), ("job", "engineer")])] | |
monad :: Maybe String | |
monad = return db >>= lookup "bob" >>= lookup "job" | |
main :: IO() | |
main = print monad | |
-- Just "engineer" |
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
# このように、-delayで一コマ一コマdelayを指定していけば可能 | |
convert -loop 0 -delay 30 hoge.gif -delay 40 fuga.gif |