Created
February 15, 2012 22:01
-
-
Save JakubOboza/1839307 to your computer and use it in GitHub Desktop.
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
| usage: ./troll.rb <your@mail> <password> <from@mail> | |
| sample output: | |
| Kuba, | |
| Kolejnośc preferowana | |
| Bardzo fajny tutorial, wprowadzenie na początek:. | |
| http://www.ocaml-tutorial.org/ | |
| Bardzo przystępnie napisana książka: | |
| http://www.cs.caltech.edu/courses/cs134/cs134b/book.pdf | |
| Super książka online (nie przeczytałem całości): | |
| http://caml.inria.fr/pub/docs/oreilly-book/ | |
| Rozważ używanie GODI (manager pakietów od OCamla) i Batteries Included | |
| (`nowa' standardowa biblioteka). | |
| Jak potrzebujesz pomocy daj znać. | |
| --spec | |
| ... |
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
| #!/usr/bin/env ruby | |
| require 'gmail' | |
| throw "Wojtek nie psuj" if ARGV.length < 3 | |
| username = ARGV[0] | |
| password = ARGV[1] | |
| from = ARGV[2] | |
| Gmail.connect(username, password) do |gmail| | |
| mails = gmail.inbox.emails(:read, :from => from) | |
| mails.map{|mail| puts; puts mail.body} | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment