Created
March 7, 2016 15:17
-
-
Save lleirborras/00780cf48e31d81d4172 to your computer and use it in GitHub Desktop.
Make my day
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 | |
require 'etc' | |
require 'cgi' | |
require 'open-uri' | |
require 'nokogiri' | |
message = "@lleirborras is comitting " | |
message << Nokogiri.parse(open("http://whatthecommit.com").read).css('#content p').first.text.strip | |
open("https://api.telegram.org/XXXXXX:YYYYYYYYYYYYYYYY/sendMessage?chat_id=FOOOOO&text=#{CGI::escape message}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment