Last active
January 31, 2016 09:38
-
-
Save msroot/89b93252cd574d7067b2 to your computer and use it in GitHub Desktop.
Yiannis Deliyiannis bday
This file contains hidden or 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
| # bash < <(curl -s http://mywebsite.com/myscript.txt) | |
| require 'rubygems' | |
| require 'nokogiri' | |
| require 'open-uri' | |
| page = Nokogiri::HTML(open("http://www.wishesquotes.com/birthday/top-50-friends-birthday-wishes")) | |
| line ||= 100.times.map{"-"}.join << "\n" | |
| icons = %w(π π β€οΈ π π π πͺ π π ) | |
| wishes = page.xpath('//*[@id="post-3186"]/div/ul[1]').css('li').to_a | |
| beer = -> { | |
| Array(1..31).sample.times.map{"πΊ"}.join(" ") | |
| } | |
| while true | |
| puts "\e[32m #{icons.sample} Yiannis Deliyiannis:\e[0m" | |
| puts line | |
| puts wishes.sample.text | |
| puts beer.call | |
| puts line | |
| sleep 5 | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment