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
thufir@dur:~$ | |
thufir@dur:~$ | |
thufir@dur:~$ | |
thufir@dur:~$ | |
thufir@dur:~$ | |
thufir@dur:~$ | |
thufir@dur:~$ | |
thufir@dur:~$ | |
thufir@dur:~$ | |
thufir@dur:~$ |
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
thufir@dur:~$ | |
thufir@dur:~$ telnet foo.net nntp | |
Trying 69.16.185.250... | |
Connected to bar.com. | |
Escape character is '^]'. | |
200 Welcome to Baz News Service | |
group comp.lang.ruby | |
211 291034 59802 350835 comp.lang.ruby | |
next | |
223 59803 <1110475485.063688.123780@o13g2000cwo.googlegroups.com> |
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
thufir@dur:~/ruby/reader$ | |
thufir@dur:~/ruby/reader$ ruby reader.rb | |
[1]+ Stopped ruby reader.rb | |
thufir@dur:~/ruby/reader$ reader.rb:14:in `<main>': uninitialized constant Google (NameError) | |
[1]+ Exit 1 ruby reader.rb | |
thufir@dur:~/ruby/reader$ | |
thufir@dur:~/ruby/reader$ cat reader.rb | |
require 'rubygems' |
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
thufir@dur:~$ | |
thufir@dur:~$ sudo echo "hostname wrong" | |
sudo: unable to resolve host dur | |
hostname wrong | |
thufir@dur:~$ | |
thufir@dur:~$ cat /etc/hostname | |
dur | |
thufir@dur:~$ | |
thufir@dur:~$ cat /etc/hosts | |
127.0.0.1 localhost |
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
thufir@dur:~$ | |
thufir@dur:~$ type rvm | head -1 | |
rvm is a function | |
thufir@dur:~$ | |
thufir@dur:~$ rvm --version | |
rvm 1.10.3 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.beginrescueend.com/] | |
thufir@dur:~$ | |
thufir@dur:~$ ruby --version |
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
thufir@dur:~/ruby/nntp$ | |
thufir@dur:~/ruby/nntp$ ruby nntp.rb | |
/home/thufir/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead. | |
nntp.. | |
host... | |
#<Net::NNTP:0x90d66ec> | |
/home/thufir/.rvm/gems/ruby-1.9.3-p125/gems/ruby-net-nntp-1.0.0/lib/net/nntp.rb:30:in `logger': uninitialized class variable @@logger in Net::NNTP (NameError) | |
from /home/thufir/.rvm/gems/ruby-1.9.3-p125/gems/ruby-net-nntp-1.0.0/lib/net/nntp.rb:35:in `debug' | |
from /home/thufir/.rvm/gems/ruby-1.9.3-p125/gems/ruby-net-nntp-1.0.0/lib/net/nntp.rb:95:in `read_response' | |
from /home/thufir/.rvm/gems/ruby-1.9.3-p125/gems/ruby-net-nntp-1.0.0/lib/net/nntp.rb:73:in `connect' |
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
thufir@dur:~/NetBeansProjects/telnetd-1.0$ | |
thufir@dur:~/NetBeansProjects/telnetd-1.0$ | |
thufir@dur:~/NetBeansProjects/telnetd-1.0$ | |
thufir@dur:~/NetBeansProjects/telnetd-1.0$ | |
thufir@dur:~/NetBeansProjects/telnetd-1.0$ | |
thufir@dur:~/NetBeansProjects/telnetd-1.0$ java -version | |
java version "1.7.0_03" | |
Java(TM) SE Runtime Environment (build 1.7.0_03-b04) | |
Java HotSpot(TM) Client VM (build 22.1-b02, mixed mode) | |
thufir@dur:~/NetBeansProjects/telnetd-1.0$ |
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
thufir@dur:~/ruby/net_telnet$ | |
thufir@dur:~/ruby/net_telnet$ | |
thufir@dur:~/ruby/net_telnet$ ruby net.rb | |
trying to connect... | |
...connected | |
^C/home/thufir/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/telnet.rb:557:in `select': Interrupt | |
from /home/thufir/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/telnet.rb:557:in `waitfor' | |
from /home/thufir/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/telnet.rb:697:in `cmd' | |
from net.rb:12:in `<main>' |
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
emails = [] | |
File.open("/var/spool/news/alt/test/9").each do |line| | |
puts line | |
emails.push(line.scan(/<(.*?)>/).flatten) | |
end | |
puts "*"*80 | |
puts emails |
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
class Header | |
attr_accessor :id | |
end | |
header = Header.new | |
File.open("/var/spool/news/alt/test/9").each do |line| | |
puts line | |
case line | |
when (/^\s*Message-ID:/) | |
puts "message" |