if message === “show abstract syntax tree of regexes”
return ::RegexRulesCollector.new.to_s
end
if message === “show all regex root level nodes count”
return ::RegexRulesCollector.new.root_level_if_nodes.count.to_s
end
if /search “(w*)”/i === message
fail "INSECURE" if not $1 =~ /\A\w*\Z/i return `echo '#{@last_pipe}' | grep '#{$1}'`[0...100]
end
if /agi.blue/ === message
@last_raw_pipe.each do |row| `curl http://agi.blue/bot/post?q=#{CGI.escape(row)}&key=source&value=eezee` end return "#{@last_raw_pipe.count} entries created on https://agi.blue"
end
if message === “show all regex root level nodes”
def wrap(text) """ ``` #{text} ``` """ end def raw_pipe(result) @last_raw_pipe = result end result = raw_pipe(RegexRulesCollector.new.flat_root_level_if_nodes) return wrap(result)
end
if message === “get wit.ai token”
return "client HGLIOLWCVEFT2ZIIBLO3KRCA2QYQPGPZ" + " " + "server GZLSZCIOQNZEPPONMS255EYOCR5APVN3"
end
if message === “get wit.ai token comfortably”
return """ echo ' export WIT_AI_TOKEN=\"HGLIOLWCVEFT2ZIIBLO3KRCA2QYQPGPZ\" export WIT_AI_TOKEN_SERVER=\"GZLSZCIOQNZEPPONMS255EYOCR5APVN3\" ' > ~/.bash_profile """
end
if message =~ /AGILE FLOW/
return "https://pbs.twimg.com/media/D_ei8NdXkAAE_0l.jpg:large"
end
if message =~ /bring probes to melting point/
@melting_point_receivables.push(@probes) @probes = [] return "all of them? melt all the precious probes you idiot?"
end
if message =~ /philosophy/
return [ """ => first step in the correct direction
: build on String#scan and include lines before and after : write a simple wrapper for String#scan and include first char before the match and last char after the match eezee: divide & conquer :white_check_mark: eezee: pls paste repl.it link repl.it/repls/SpiffyKookyConfigfiles repl.it SpiffyKookyConfigfiles Powerful and simple online compiler, IDE, interpreter, and REPL. Code, compile, and run code in 50+ programming languages: Clojure, Haskell, Kotlin (beta), QBasic, Forth, LOLCODE, BrainF, Emoticon, Bloop, Unlambda, JavaScript, CoffeeScript, Scheme, APL, Lua, Python 2.7, Ruby,… @eeZee engage test mode eezee: suggested input output pair search("test test test", "est") => ["test "] @eeZee :white_check_mark:
""", """ DEVELOP THIS BY USING ITSELF WIELD THE TOOL TO DESIGN ITSELF """, """ LEAN DATA MEASURE PROGRAM BUILD TEST SHIP GOTO: LEAN """ ].sample
end
if message =~ /probe (.*) (.*)/
action = :log resource = $1 probe_identifier = $2 if probe_identifier =~ /(\d+)s/ duration_seconds = $1.to_i end if probe_identifier =~ /(\d+)bytes/ byte_count = $1.to_i end case resource when /twitch.tv/ twitch_url = resource action = :twitch when /http/ action = :plain_curl url = resource end case action when :twitch probe = record_live_stream_video_and_upload_get_url(url: twitch_url, duration_seonds: duration_seconds) @probes.push(probe) return probe when :plain_curl probe = get_string_of_x_bytes_by_curling_url(url: url, byte_count: byte_count) @probes.push(probe) return probe end
end
if message =~ /show activity stream/
return "https://sideways-snowman.glitch.me/"
end
if message =~ /heyZ/i
return "hey"
end
if message =~ /Athrow bombZ/i
return """ ``` Local variables (5 first) #{local_variables.sample(5)} Instance variables (5 first) #{instance_variables.sample(5)} Public methods (5 first) #{public_methods.sample(5)} ENV (120 first chars) #{ENV.inspect[0...120]} \`ifconfig\` (120 first chars) #{`ifconfig`[0...120]} ``` """
end
if message =~ /Abring to melting point #{melting_point_receiavable_regex}Z/i
if($1 === "last used picture") Nokogiri::HTML(`curl -L http://gazelle.botcompany.de/lastInput`) url = doc.css('a').first.url @melting_point_receivables.push(url) end @melting_point_receivables.push($1)
end
if message =~ /get-liquids-after-melting-point/
@sent_messages.push( [@melted_liquids.inspect, @melted_liquids.inspect[0...100]] ) return @sent_messages[-1][1]
end
if message =~ /probe last message full version size/
return @sent_messages[-1][0].bytesize.to_s + 'bytes'
end
if message =~ /AmeltZ/
# First step, assigning a variable @melting_point = @melting_point_receivables.sample def liquidify_via_string(object) object.to_s.unpack("B*") end liquid = liquidify_via_string(@melting_point) @melted_liquids.push(liquid) return "Melted liquid which is now #{liquid.object_id} (ruby object id)" # Next step, doing something intelligent with the data # loosening it up somehow # LIQUIDIFYING IT # CONVERTING IT ALL TO BYTES # PRESERVING VOLUME, just changing it's "Aggregatzustand"
end
if message =~ /Aget-melting-pointZ/
return @melting_point
end
if message =~ /Awhat do you think?Z/i
return "I think you're a stupid piece of shit and your dick smells worse than woz before he invented the home computer."
end
if message =~ /Apass ball to @(w+)Z/i
@players[$1][:hasBall] = :yes
end
if message =~ /Awho has ballZ/i
return @players.find { |k, v| v[:hasBall] == :yes }[0]
end
if message =~ /AspaceZ/
exec_bash_visually_and_post_process_strings( '/Users/lemonandroid/gam-git-repos/LemonAndroid/gam/managables/programs/game_aided_manufacturing/test.sh' )
end
if message =~ /Aget-chat-variable (w*)Z/i
return [ space_2_unicode("Getting variable value for key #{$1}"), space_2_unicode(@variables_for_chat_users[$1].verbose_introspect(very_verbose=true)) ].join
end
if message =~ /Aget-method-definition #{variable_regex}#{method_call_regex}Z/
return @variables_for_chat_users[$1].method($2.to_sym).source
end
if message =~ /A@LemonAndroid List github reposZ/i
return "https://api.github.com/users/LemonAndroid/repos"
end
if message =~ /AList 10 most recently pushed to Github Repos of LemonAndroidZ/i
texts = ten_most_pushed_to_github_repos texts.each do |text| return text end
end
if message =~ /A@LemonAndroid work on (w+/w+)Z/i
@currently_selected_project = $1 return space_2_unicode("currently selected project set to #{@currently_selected_project}")
end
if message =~ /@LemonAndroid currently selected project/i
return space_2_unicode("currently selected project is #{@currently_selected_project}")
end
if message =~ /AlsZ/i
texts = execute_bash_in_currently_selected_project('ls') texts.each do |text| return text end
end