Skip to content

Instantly share code, notes, and snippets.

@kenjiskywalker
Last active December 29, 2015 16:19
Show Gist options
  • Select an option

  • Save kenjiskywalker/7696354 to your computer and use it in GitHub Desktop.

Select an option

Save kenjiskywalker/7696354 to your computer and use it in GitHub Desktop.
Earthquake.init do
command :to_hex do |m|
hex_strings = m[1].bytes.collect {|b| b.to_s(16) }.join(" ")
# 文字制限かかるからダメだ
# zero_add = []
# hex_strings.split(/ /).each do |s| ; zero_add << "0x#{s}" ; end
# hex_strings = zero_add.join(' ')
input hex_strings
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment