Skip to content

Instantly share code, notes, and snippets.

View ron623's full-sized avatar

h.shino ron623

  • jp
View GitHub Profile
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
______ ______ ______ __ __ __ ______
/\ == \ /\ __ \ /\__ _\ /\ \/ / /\ \ /\__ _\
\ \ __< \ \ \/\ \ \/_/\ \/ \ \ _"-. \ \ \ \/_/\ \/
\ \_____\ \ \_____\ \ \_\ \ \_\ \_\ \ \_\ \ \_\
\/_____/ \/_____/ \/_/ \/_/\/_/ \/_/ \/_/
This is a sample Slack bot built with Botkit.
@ron623
ron623 / abehiroshi
Created July 25, 2016 08:15
abehiroshi
<body background="../image/drama.jpg" marginwidth="0" marginheight="0">
<br>
<center><h2>阿部 寛のドラマ出演</h2></center>
<div align="center">
<table border="1" width="700">
<tbody><tr>
<td align="LEFT"><strong>2016年10月22日</strong></td>
<td align="LEFT"><strong>「<a href="http://www.nhk.or.jp/dodra/sniffer/" target="_blank">スニッファー 嗅覚捜査官あ</a>」</strong></td>
</tr>
<tr>
@ron623
ron623 / Encoding::CompatibilityError
Created July 14, 2016 01:17
Encoding::CompatibilityError
2つのエンコーディング間に互換性がない場合に発生する例外。
エンコーディングの異なる文字列を連結しようとした場合などに発生します。
"あ".encode("EUC-JP") + "あ".encode("UTF-8")
#=> Encoding::CompatibilityError: incompatible character encodings: EUC-JP and UTF-8
@ron623
ron623 / cucumber Couldn't load 2.1 gherkin_lexer_en
Created July 14, 2016 00:56
cucumber Couldn't load 2.1 gherkin_lexer_en
cucumber Couldn't load 2.1/gherkin_lexer_en
This workaround has worked for me. After bundle install, remove the gherkin gem:
gem uninstall gherkin --force
Reinstall the gem (it may take a while):
gem install gherkin --platform ruby -v 2.12.2
Go to the folder of the gem inside your ruby installation directory. Something like this:
@ron623
ron623 / cannot load gherkin_lexer_en
Last active July 14, 2016 01:52
cannot load gherkin_lexer_en
WARNING: cannot load such file -- 2.3/gherkin_lexer_en
Couldn't load 2.3/gherkin_lexer_en
The $LOAD_PATH was:
c:/jenkins/workspace/xxx
<省略>
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/gherkin-2.12.2/lib
C:/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.2.0/gherkin-2.12.2
<省略>
@ron623
ron623 / ruby helloworld
Created May 6, 2016 03:30
ruby helloworld
puts "Hello World"
@ron623
ron623 / java hellowolrd
Created May 6, 2016 03:30
java hellowolrd
class HelloWorld {
public static void main (String[] Args){
System.out.Println("Hello World");
}
}
#-*- coding: utf-8 -*-
@test
Feature: テスト
Scenario: ○○のテスト
Given "A業務" 文書のワークフロー状態を完了にする
# coding: utf-8
steps_for :test do
step ":doc 文書のワークフロー状態を完了にする:" do |doc, table|
send ":user でログインする", "システム管理者"
send "ログアウトする"
end
@ron623
ron623 / boterr02
Created April 20, 2016 08:05
boterr02
C:\slack\botkit>node bot.js
Error: Specify token in environment