-
-
Save hitode909/353029 to your computer and use it in GitHub Desktop.
お顔メーカー.rb
This file contains 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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
# view-source:http://amachang.sakura.ne.jp/misc/aamaker/ | |
module AAMaker | |
def self.random(n) | |
rand(n).to_i | |
end | |
def self.randSelect(array) | |
return array[random(array.length)] | |
end | |
def self.make | |
rinkaku = randSelect([['(', ')'], ['(', ')'], ['|', '|'], ['|', '|']]); | |
otete = randSelect([['', '', '', '', ''], ['', '', 'm', '', ''], ['', '', 'ლ', '', ''], ['ლ', '', '', 'ლ', ''], ['', '「', '', '', '「'], ['', ' つ', '', '', 'つ'], ['', ' ', '', '', 'o彡゚'], ['', 'n', '', '', 'η'], ['', '∩', '', '∩', ''], ['∩', '', '', '', '∩'], ['ヽ', '', '', '', 'ノ'], ['┐', '', '', '', '┌'], ['╮', '', '', '', '╭'], ['<', '', '', '', '/'], ['╰', '', '', ' ', ''], ['o', '', '', '', 'o'], ['o', '', '', '', 'ツ'], ['', '', '', '', 'ノシ']]); | |
omeme = randSelect([['◕', '◕'], ['╹', '╹'], ['>', '<'], ['^', '^'], ['・', '・'], ['´・', '・`'], ['`・', '・´'], ['´', '`'], ['≧', '≦'], ['゚', '゚'], ['\'', '\''], ['・ิ', '・ิ'], ['❛', '❛'], ['⊙', '⊙'], [' ̄', ' ̄'], ['◕ˇ', 'ˇ◕']]); | |
okuti = randSelect(['ω', '∀', '▽', '△', 'Д' , '□', '~', 'ー', 'ェ', 'ρ', 'o']); | |
hoppe = randSelect([['', ''], ['*', ''], ['', '*'], ['', '#'], ['#', ''], ['✿', ''], ['', '✿'], ['', ';'], [';', ''], ['。', '。'], ['。', ''], ['', '。'], ['▰', '▰'], ['', '▰'], ['▰', ''], ['๑', '๑'], ['', '๑'], ['๑', '']]); | |
text = [ | |
otete[0], | |
rinkaku[0], | |
otete[1] || (otete[3] ? '' : hoppe[0]), | |
omeme[0], | |
otete[2] || okuti, | |
omeme[1], | |
otete[3] || (otete[1] ? '' : hoppe[1]), | |
rinkaku[1], | |
otete[4] | |
].join('') | |
text | |
end | |
end | |
puts AAMaker.make |
This file contains 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/zsh | |
# to use | |
# %source aa_prompt.sh | |
precmd () { | |
export PROMPT='$(aa) ' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment