Skip to content

Instantly share code, notes, and snippets.

@maimai-swap
Last active December 10, 2015 19:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maimai-swap/4481463 to your computer and use it in GitHub Desktop.
Save maimai-swap/4481463 to your computer and use it in GitHub Desktop.
Upside down tweet / earthquake plugin
# -*- coding: utf-8 -*-
# Upside down tweet / earthquake plugin
#
# upd:
#
require 'pp'
class Upd
@@values = {
'a'=>'ɐ','b'=>'q','c'=>'ɔ','d'=>'p','e'=>'ǝ','f'=>'ɟ','g'=>'ƃ','h'=>'ɥ','i'=>'ı',
'j'=>'ɾ','k'=>'ʞ','l'=>'l','m'=>'ɯ','n'=>'u','o'=>'o','p'=>'d','q'=>'b','r'=>'ɹ',
's'=>'s','t'=>'ʇ','u'=>'n','v'=>'ʌ','w'=>'ʍ','x'=>'x','y'=>'ʎ','z'=>'z',
'Z'=>'Z','Y'=>'⅄','X'=>'X','W'=>'M','V'=>'ᴧ','U'=>'∩','T'=>'⊥','S'=>'S','R'=>'ᴚ',
'Q'=>'Ό','P'=>'Ԁ','O'=>'O','N'=>'ᴎ','M'=>'W','L'=>'⅂','K'=>'⋊','J'=>'ſ','I'=>'I',
'H'=>'H','G'=>'⅁','F'=>'Ⅎ','E'=>'Ǝ','D'=>'ᗡ','C'=>'Ↄ','B'=>'ᗺ','A'=>'∀',
'?'=>'¿','!'=>'¡','?'=>'¿','!'=>'¡','_'=>'¯'
}
def isay ( m )
str = ''
m.split(//).each { |c|
tmp = c
if ( @@values.key?(c) )
tmp = @@values[c]
end
str = tmp + str
}
str
end
end
Earthquake.init do
command :upd do |m|
boo = Upd.new;
ret = boo.isay(m[1])
input(ret)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment