[#386081] 1.9.2 Snow Leopard Installation — Viaduct Productions <lists@...>
Hi folks.
[#386089] how to make 1+a work if a is not a numeric object? — Zd Yu <zdyu2000@...>
I defined a to_i method for a, but it seems not work.
[#386100] Numeric#coerce docs are disaster — 7stud -- <bbxx789_05ss@...>
num.coerce(numeric) =E2=86=92 array
1) I don't know how coerce works.
[#386105] Installing gem problem — "amir e." <aef1370@...>
Hi
[#386114] Documentation Improvement Proposal — Chris White <cwprogram@...>
=3D Issues =3D
I reeeeeealy dislike user comments on documentation. It's one of the
On Tue, Aug 2, 2011 at 7:39 PM, Steve Klabnik <steve@steveklabnik.com> wrot=
> What's wrong with stealing WikiPedia's procedures? The model works
On Aug 2, 2011, at 11:00 AM, Steve Klabnik wrote:
Apologies, I've just responded to everyone in-line.
On Tue, Aug 2, 2011 at 9:46 PM, Steve Klabnik <steve@steveklabnik.com> wrot=
On Tue, Aug 2, 2011 at 8:46 PM, Steve Klabnik <steve@steveklabnik.com>wrote:
On Wed, Aug 03, 2011 at 05:22:32AM +0900, Adam Prescott wrote:
I would like to touch on a more general issue I've had with language
[#386153] Create dialog box after receiving a security message — "zarul z." <zafi240781@...>
Hi
[#386159] Abstract, modules and inheritance question — Piter Fcbk <piter.fcbk@...>
I have to import some csv files into the database. Each file had a
Piter Fcbk wrote in post #1014749:
[#386172] Kernel.load and local scope — Mark Beek <markbeek@...>
When I use a variable in a loaded file that corresponds to a variable in
[#386177] What type of simple applications you wrote while learning Ruby? — Rubyist Rohit <passionate_programmer@...>
I am using NotePad++ on Windows 7 to write and learn Ruby. While
I doubt I'm saying anything controversial by stating that most people who
[#386186] Colores en la terminal — "Yábir G." <cometa199@...>
Hi everyone!
[#386203] Corrections in a Class — Rubyist Rohit <passionate_programmer@...>
Below is the code of my initial Class in the Ruby world. I want to make
With this what I followed is:
[#386227] Textmate: format ruby code — Michelle Pace <michelle@...>
Hello,
[#386231] Brainstorming ideas how to improve Ruby's documentation — Marc Heiler <shevegen@...>
The title is misleading...
Hello,
What are you talking about? Ruby has a nice docs, railsapi.com for example.
On Fri, Aug 5, 2011 at 2:27 AM, Alexander Litvinovsky
Alexander Litvinovsky wrote in post #1015099:
On Fri, Aug 5, 2011 at 11:07 AM, Fred L. <f.linard@fdtec.net> wrote:
On Fri, Aug 05, 2011 at 05:48:08PM +0900, Marc Heiler wrote:
As a longtime [former] Java programmer, I have always found the java
On Fri, Aug 5, 2011 at 7:36 PM, Andy Davis <ananonana@gmail.com> wrote:
> They are a usability and accessibility nightmare.
On Fri, Aug 5, 2011 at 8:44 PM, Andy Davis <ananonana@gmail.com> wrote:
On Fri, Aug 5, 2011 at 02:48, Marc Heiler <shevegen@linuxmail.org> wrote:
On Sat, Aug 06, 2011 at 10:07:33AM +0900, Ryan Davis wrote:
On Aug 5, 2011, at 7:05 PM, Chad Perrin wrote:
[#386271] RubyLang.info is looking for more contributors! — Chris Ledet <christopher.ledet@...>
Hello fellow Rubyists
On Sat, Aug 06, 2011 at 05:54:34AM +0900, Chris Ledet wrote:
[#386296] Methods defined with module_eval are... faster? — Iñaki Baz Castillo <ibc@...>
Hi, just let me show this code:
[#386297] Help out with the next version of ruby-lang.org — Magnus Holm <judofyr@...>
https://github.com/rubylang/ruby-lang.org
This sounds great. I've been using Markdown as a source file format
[#386312] bin-file on linux — CC Chen <dickyhide@...>
How to convert the script code to bin-file(Linux)?
[#386323] Excel chart question — CC Chen <dickyhide@...>
On Win32ole the excel chart created
On Mon, Aug 8, 2011 at 7:40 AM, CC Chen <dickyhide@gmail.com> wrote:
Timothy Barnes wrote in post #1015519:
[#386328] 2011 Gotham Ruby Conference Videos are up — Stephen Schor <beholdthepanda@...>
Better late than never.
On Mon, Aug 8, 2011 at 12:23 PM, Stephen Schor <beholdthepanda@gmail.com>wrote:
On Mon, Aug 8, 2011 at 10:54 PM, Josh Cheek <josh.cheek@gmail.com> wrote:
On Tue, Aug 9, 2011 at 12:49 AM, Kevin <darkintent@gmail.com> wrote:
[#386341] Exceptional Ruby and Metaprogramming Ruby has anyone picked these up? — Kevin <darkintent@...>
I'm thinking of picking up these two books and was wondering if anyone
On Aug 8, 2011 8:43 PM, "Kevin" <darkintent@gmail.com> wrote:
Haven't read exceptional ruby, but metaprogramming ruby is very good. Probab=
Like Ian and Andrew, I really liked Metaprogramming Ruby and have not
On Mon, Aug 8, 2011 at 8:42 PM, Kevin <darkintent@gmail.com> wrote:
[#386364] need help to run my first program — "eman a." <eng.emanahmed22@...>
hi all,
[#386378] ruby installation — "Momodou J." <modou75alieu@...>
how to implement this in windows :
Chris White wrote in post #1015721:
On 08/09/2011 05:53 PM, Momodou J. wrote:
On Tue, Aug 9, 2011 at 6:17 PM, Chris <chris@s-4-u.net> wrote:
[#386388] MiniTest before and after all — Intransition <transfire@...>
What is the reasoning behind MiniTest's lack of support for
[#386389] Inspect method — "amir e." <aef1370@...>
Hi
[#386394] Problem in typical code — "amir e." <aef1370@...>
Hi
[#386401] *WHY* does this not work? — serialhex <serialhex@...>
ok, so code:
On Wed, Aug 10, 2011 at 03:52:59AM +0900, serialhex wrote:
On Tue, Aug 9, 2011 at 3:05 PM, Darryl L. Pierce <mcpierce@gmail.com> wrote:
On Tue, Aug 9, 2011 at 1:11 PM, serialhex <serialhex@gmail.com> wrote:
ok, many responses, all very good and reasonable, but i guess my point is
Whilst Ruby is probably a perfectly logical and self-consistent language
[#386413] Any simple solution for automatic test running? — Michal Suchanek <hramrach@...>
Hello,
[#386421] Is \d supposed to match Unicode Numbers? — Gavin Kistner <phrogz@...>
I posted this as a question here:=0Ahttp://stackoverflow.com/questions/699=
On Aug 09, 2011, at 02:28 PM, Gavin Kistner <phrogz@me.com> wrote:=0AI pos=
[#386462] Passing multiple parameters — Avantec Van <abhilash@...>
Hi,
[#386464] cool.io 1.1.0 - a cool event library for Ruby — Tony Arcieri <tony.arcieri@...>
cool.io has a cool new version... 1.1.0
[#386472] Reg Ex Help Required — "saurabh a." <saurabh_anand2002@...>
Hi,
On Wed, Aug 10, 2011 at 1:30 PM, Chris White <cwprogram@live.com> wrote:
[#386480] Odd regexp behavior — Glen Holcomb <damnbigman@...>
I'm running 1.9.2-p180
Also,
On Thu, Aug 11, 2011 at 12:41 AM, 7stud -- <bbxx789_05ss@yahoo.com> wrote:
On Thu, Aug 11, 2011 at 5:52 AM, Glen Holcomb <damnbigman@gmail.com> wrote:
On Aug 12, 2011, at 07:28 AM, Glen Holcomb <damnbigman@gmail.com> wrote:=0A=
On Fri, Aug 12, 2011 at 9:27 AM, Gavin Kistner <phrogz@me.com> wrote:
Because, when the (\s|$) at the end matches \s (a space), this space
[#386481] regex position error — Carlos Camargo <camargo.cr@...>
I have a regular expression:
[#386502] Problems with Accent in Ruby 1.9+ (Latin Characters) — Marco Floriano <marcofloriano@...7.com>
Hi folks,
[#386506] Distributing Ruby program as a standalone executable (exe) for windows — Michelle Pace <michelle@...>
Hello there,
It is possible, using "Ocra" gem. (There are also some other ways, but
[#386510] 1.9.3-preview1 & rake & Test::Unit — Ollivier Robert <keltia@...>
Is there something changed between 1.9.2 and 1.9.3-preview1 in
[#386515] puts 2 float value at one line — Filemonster Filemonster <fantasyleague0629@...>
I want to print 2 float values which are separated by a space at one
[#386539] Online tutor for Ruby — T J Pereira <tj5155@...>
I am finding it difficult to apply the RUBY program. Its because i have
On Fri, Aug 12, 2011 at 6:00 AM, T J Pereira <tj5155@tm.net.my> wrote:
TJ
On Fri, Aug 12, 2011 at 8:07 AM, cathy alomari <cathy1428@gmail.com> wrote:
[#386556] I/O learning resource — "amir e." <aef1370@...>
Hi
[#386563] A Corresponding between C++ AND Ruby — "amir a." <amirhoo2008@...>
Hi
[#386584] noob question - pattern matching — Jesper Brandt <jb@...>
I have a list of 22000 8 digit numbers. Im looking for a number which is
[#386592] Stuck at an Issue with OptParse and File IO — ideal one <idealone5@...>
Hi,
ideal one wrote in post #1016461:
[#386594] graph 2.2.0 Released — Ryan Davis <ryand-ruby@...>
graph version 2.2.0 has been released!
On 08/13/2011 02:56 AM, Ryan Davis wrote:
rake gallery
On 08/15/2011 09:41 AM, Ryan Davis wrote:
[#386599] How to get the Name of a Variable — Agent Mulder <mbmulder@...>
Hello.
> I suppose I'd have to ask why this is necessary. If you need a name
On Sat, Aug 13, 2011 at 12:53 PM, Agent Mulder <mbmulder@online.nl> wrote:
[#386610] Fwd: Why this? — Николай <Godsent@...>
[#386623] Getting information from keyboard — "amir e." <aef1370@...>
Hi
[#386627] Problem with Files — "amir e." <aef1370@...>
Hi
[#386631] How to use "case" to match class names? (=== not so funny) — Iñaki Baz Castillo <ibc@...>
Hi, easy example of what I need:
[#386637] class inheritance and class constants — Iñaki Baz Castillo <ibc@...>
------------------------
2011/8/14 Chris White <cwprogram@live.com>:
On Aug 14, 2011, at 10:31 AM, I=F1aki Baz Castillo wrote:
[#386643] Unwanted scan() method behavior — Panagiotis Atmatzidis <ml@...>
Greeting to everyone from Greece!
[#386662] SFTP grep on foreach — Sönke Buhr <sonke@...>
Hi guys,
[#386686] Ternary statement needing parenthesis..(?) — Michelle Pace <michelle@...>
Hello, just wondering why is it that I have to use the parenthesis in
[#386693] Converting .tiff -to-> .png? — Michelle Pace <michelle@...>
Hello there, I need to scale down a .tiff file and turn it into a .png
[#386710] How to create binary data from Ruby — Iñaki Baz Castillo <ibc@...>
Hi, I need to create binary data from Ruby to send via network some
[#386721] SQL statement w/ Ruby variables — "Jeff S." <jesmith2095@...>
Hello All,
\223 ocatal = 147 decimal = 'o' with circumflex in extended ASCII
> sid =3D "12345678'
[#386741] Introducing Blirb--a tongue-in-cheek interactive quiz/game/tutorial — "Ian M. Asaff" <ian.asaff@...>
Hi Everyone,
[#386751] Re: How to send utf8 data to remote computer in ruby 1.9.2 — Alexey Petrushin <axyd80@...>
I believe that's not the right way to solve problems of 1% by
On Aug 17, 2011, at 11:54 AM, Alexey Petrushin <axyd80@gmail.com> wrote:
[#386755] Strangely slow float to int and int to float conversion — Petr Kovar <pejuko@...>
Hi,
[#386757] Papyrus 0.0.1 released — Quintus <sutniuq@...>
-----BEGIN PGP SIGNED MESSAGE-----
On Wed, Aug 17, 2011 at 4:47 PM, Quintus <sutniuq@gmx.net> wrote:
On Thu, Aug 18, 2011 at 2:50 AM, Florian Gilcher <flo@andersground.net>wrote:
[#386776] change into symlink directory - how? — Alexander Schaal <aschaal@...>
Hello all,
Thanks for the answer.
[#386779] bash: gem: command not found — reed das <nkatsikanis@...>
I have installed ruby with cygwin
[#386784] Green Shoes v1.0 released — ashbb <ashbbb@...>
Hello, everyone.
why do I get this error?
Hi,
Il giorno Tue, 10 Jan 2012 03:26:19 +0900
[#386796] Searching in a directory — Yu Yu <htwoo@...>
Hello,
[#386813] Sticky bit via pure ruby — Marc Heiler <shevegen@...>
In unix you can do:
[#386818] switch string to object — zuerrong <zuerrong@...>
Hello,
On Fri, Aug 19, 2011 at 1:30 AM, zuerrong <zuerrong@gmail.com> wrote:
>>
On Fri, Aug 19, 2011 at 1:52 AM, zuerrong <zuerrong@gmail.com> wrote:
[#386821] Sorting Ruby hash by value and stored the result in hash. — kevin peter <sateesh.mca09@...>
Hi
[#386833] Open file .exe — "Yábir G." <cometa199@...>
How i can open a exe file with ruby
[#386834] Execute Inline Ruby for OSX (system wide) — Pawel Niznik <niznik.pawel@...>
Hey there,
[#386843] crear executable aplication — "Yábir G." <cometa199@...>
hello
[#386869] Documentation Translations — Chris White <cwprogram@...>
Hello Everyone,
[#386884] viiite 0.1.0 Released — Bernard Lambeau <blambeau@...>
viiite version 0.1.0 has been released!
[#386893] Gritty Details of super() — luke gruber <luke.gru@...>
Hey guys,
On Aug 21, 2011, at 11:21 AM, luke gruber <luke.gru@gmail.com> wrote:
On Sun, Aug 21, 2011 at 7:48 PM, Gavin Kistner <phrogz@me.com> wrote:
>extend Mod
Class is also an Module wich is also an Object (and there the circle is
[#386900] Possble bug in Ruby parser (Fixnum#times within "case" statement) — Iñaki Baz Castillo <ibc@...>
Hi, I cannot find an explanation for the following issue so I think it's a =
2011/8/22 Ryan Davis <ryand-ruby@zenspider.com>:
2011/8/22 Ryan Davis <ryand-ruby@zenspider.com>:
2011/8/22 Ryan Davis <ryand-ruby@zenspider.com>:
2011/8/22 Ryan Davis <ryand-ruby@zenspider.com>:
So this refactoring works:
[#386917] mkmf & config question — serialhex <serialhex@...>
ok so check this out:
[#386920] New to Ruby some problems — jack jones <shehio_22@...>
I am new to Ruby, My mother tongue is C++ .. I have too many problems I
On Aug 22, 2011, at 8:32 AM, jack jones wrote:
Thank you very much Chuck Remes :)
[#386935] Multithreading in Ruby — Nabs Kahn <nabusman@...>
Hi, I'm relatively new to ruby and threading in general. I'm trying to
[#386949] Want to get involved with this doc stuff? I'm making it even easier — Steve Klabnik <steve@...>
Hey guys-
Steve Klabnik wrote in post #1017919:
[#386967] win32-open3 Issue — Rails Crazy Idiot <mail2sanand@...>
Hi All,
[#386991] Any model-validation library without ActiveSupport dependency? — Alexey Petrushin <axyd80@...>
Hello, is there any model-validation library without dependency on
Thanks.
[#387004] Conventions for reusable component assets — Intransition <transfire@...>
What conventions have evolved for placing reusable website assets in a
On Wed, Aug 24, 2011 at 4:38 PM, Intransition <transfire@gmail.com> wrote:
Cnjm
So funny story. I have been on this list for about 3 months. Always told
[#387013] how to find all matches using ruby regex? — michael xu <guorong.xu@...>
I have the following ruby code and I want to find all matched
[#387043] calling a descendant's method — Alexey Muranov <muranov@...>
Hello,
[#387058] How the access the values of this result — QAS WM <qaiserwali@...>
I am getting the following as a result of a script I run.
Le 26/08/2011 09:33, QAS WM a 辿crit :
[#387070] overloading methods question please? — jack jones <shehio_22@...>
def do_something(a as Array)
[#387089] ssh login to a host — Rick Tan <bellcolt@...>
Hi,
[#387094] Re: Ruby Future in coming years — Akshay Jangid <akshay.dce@...>
Akshay Jangid wrote in post #1008294:
[#387101] Issue with scruffy and Rmagick — art tav <arturo@...>
Hi
[#387115] Non-literal hash elements in argument list? — Jay Levitt <jay-rforum@...>
Many Rails helpers use an idiomatic options hash as their last argument;
[#387120] NEWBIE issue: getting the rails command to work — Jason Hsu <jhsu802701@...>
My OS: Swift Linux (derivative of antiX Linux, a lightweight version of MEPIS)
The "rails tickets" command didn't work, but the "rails new tickets" command did work.
[#387133] Connecting Ruby and MySQL — "amir e." <aef1370@...>
I installed MySQL 5.5 ( mysql-installer-5.5.15.0.msi ) and mysql gem (
[#387138] String#split resets regex captures variables (Ruby 1.8.7) — Olivier Lance <bestiol@...>
Hi,
Olivier Lance wrote in post #1018967:
I think it makes sense for $1, $2 etc to change any time a regex match
2011/8/29 Bartosz Dziewo=C5=84ski <matma.rex@gmail.com>
Hi all,
[#387196] SAMSUNG to produce "Ruby on Rails in Silicon" System on a Chip — Ilias Lazaridis <ilias@...>
(public draft)
I've got a Samsung Galaxy S II. It's great. I only have to re-boot it
Note to readers:
[#387197] Prepend a character to a string in ruby — ruby rails <rubyonrails4me@...>
Hi,
Another way:
On 31 August 2011 13:44, Marc Heiler <shevegen@linuxmail.org> wrote:
On Wed, Aug 31, 2011 at 7:19 AM, Michal Suchanek <hramrach@centrum.cz> wrote:
[#387202] Deaf Grandma Program doesn't work right — Samuel Mensah <sasogeek@...>
Grandma has hearing issues 'cos she's getting old. All she does is
[#387212] GUI programming — Samuel Mensah <sasogeek@...>
Is ruby GUI programming something that will come along as I study ruby
I believe right now it's better to stay with console, there's no Ruby
Alexey Petrushin wrote in post #1019470:
To be fair, I never could get wxRuby working on my computer.
Steve Klabnik wrote in post #1019624:
[#387222] Testing threads in RSpec — James Lavin <james@...>
Is it possible to test threads in RSpec? For example (FYI: Jukebox is a
[#387225] csv parsing issue — Michael Blue <m_josenhans@...>
I've generated a CSV Document using Open Office csv export.
[#387233] ripper on array access operation — "Surya G." <sgaddipati@...>
Ripper.sexp('a[1]')
Quoting "Surya G." <sgaddipati@obtiva.com>:
unknown wrote in post #1019486:
Quoting "Surya G." <sgaddipati@obtiva.com>:
On Aug 31, 2011, at 7:00 PM, justincollins@ucla.edu wrote:
On 08/31/2011 08:41 PM, Michael Edgar wrote:
Re: Unwanted scan() method behavior
Hello,
Thanks for reply,
On 14 =CE=91=CF=85=CE=B3 2011, at 9:06 =CE=BC.=CE=BC., Bartosz =
Dziewo=C5=84ski wrote:
> I re-read your mail and realized that I don't really understand what
> you're trying to accomplish, and my previous mail wasn't probably
> really useful. Sorry.
I don't blame you for that, neither would I probably.
>=20
> -- Matma Rex
>=20
Here's a better explanation:
-------------------------------------
$ sed 's/[0-9]\{1,3\}\(\.[0-9]\{1,3\}\)\{3\}/(127.0.0.1)/' <fail2ban.log =
> fail2ban.log
$ cat fail2ban.log
2011-08-07 23:32:09,210 fail2ban.server : INFO Changed logging target =
to /var/log/fail2ban.log for Fail2ban v0.8.4
2011-08-07 23:32:09,237 fail2ban.jail : INFO Creating new jail =
'ssh-ipfw'
2011-08-07 23:32:09,239 fail2ban.jail : INFO Jail 'ssh-ipfw' uses =
poller
2011-08-07 23:32:09,373 fail2ban.filter : INFO Added logfile =3D =
/var/log/secure.log
2011-08-07 23:32:09,376 fail2ban.filter : INFO Set maxRetry =3D 3
2011-08-07 23:32:09,379 fail2ban.filter : INFO Set findtime =3D 600
2011-08-07 23:32:09,381 fail2ban.actions: INFO Set banTime =3D 600
2011-08-07 23:32:09,659 fail2ban.jail : INFO Jail 'ssh-ipfw' started
2011-08-08 07:37:00,199 fail2ban.actions: WARNING [ssh-ipfw] Ban =
127.0.0.1
2011-08-08 07:37:04,328 fail2ban.actions: WARNING [ssh-ipfw] Ban =
127.0.0.1
2011-08-08 07:47:00,650 fail2ban.actions: WARNING [ssh-ipfw] Unban =
127.0.0.1
2011-08-08 07:47:05,248 fail2ban.actions: WARNING [ssh-ipfw] Unban =
127.0.0.1
2011-08-09 00:25:38,918 fail2ban.actions: WARNING [ssh-ipfw] Ban =
127.0.0.1
2011-08-09 00:35:39,631 fail2ban.actions: WARNING [ssh-ipfw] Unban =
127.0.0.1
2011-08-09 03:58:18,229 fail2ban.actions: WARNING [ssh-ipfw] Ban =
127.0.0.1
2011-08-09 04:08:18,904 fail2ban.actions: WARNING [ssh-ipfw] Unban =
127.0.0.1
2011-08-09 06:04:18,785 fail2ban.actions: WARNING [ssh-ipfw] Ban =
127.0.0.1
2011-08-09 06:14:19,403 fail2ban.actions: WARNING [ssh-ipfw] Unban =
127.0.0.1
2011-08-09 09:43:32,351 fail2ban.actions: WARNING [ssh-ipfw] Ban =
127.0.0.1
2011-08-09 09:53:32,964 fail2ban.actions: WARNING [ssh-ipfw] Unban =
127.0.0.1
2011-08-09 23:07:48,462 fail2ban.actions: WARNING [ssh-ipfw] Ban =
127.0.0.1
2011-08-09 23:17:49,334 fail2ban.actions: WARNING [ssh-ipfw] Unban =
127.0.0.1
2011-08-09 23:37:50,235 fail2ban.actions: WARNING [ssh-ipfw] Ban =
127.0.0.1
2011-08-09 23:47:50,446 fail2ban.actions: WARNING [ssh-ipfw] Unban =
127.0.0.1
2011-08-10 02:09:32,868 fail2ban.actions: WARNING [ssh-ipfw] Ban =
127.0.0.1
2011-08-10 02:19:33,067 fail2ban.actions: WARNING [ssh-ipfw] Unban =
127.0.0.1
2011-08-10 13:41:46,288 fail2ban.actions: WARNING [ssh-ipfw] Ban =
127.0.0.1
2011-08-10 13:51:47,117 fail2ban.actions: WARNING [ssh-ipfw] Unban =
127.0.0.1
2011-08-10 22:50:44,647 fail2ban.actions: WARNING [ssh-ipfw] Ban =
127.0.0.1
2011-08-10 23:00:45,106 fail2ban.actions: WARNING [ssh-ipfw] Unban =
127.0.0.1
2011-08-10 23:18:48,976 fail2ban.actions: WARNING [ssh-ipfw] Ban =
127.0.0.1
2011-08-10 23:28:49,140 fail2ban.actions: WARNING [ssh-ipfw] Unban =
127.0.0.1
2011-08-11 07:32:36,636 fail2ban.server : INFO Changed logging target =
to /var/log/fail2ban.log for Fail2ban v0.8.4
2011-08-11 07:32:36,664 fail2ban.jail : INFO Creating new jail =
'ssh-ipfw'
2011-08-11 07:32:36,666 fail2ban.jail : INFO Jail 'ssh-ipfw' uses =
poller
2011-08-11 07:32:36,800 fail2ban.filter : INFO Added logfile =3D =
/var/log/secure.log
2011-08-11 07:32:36,802 fail2ban.filter : INFO Set maxRetry =3D 3
2011-08-11 07:32:36,806 fail2ban.filter : INFO Set findtime =3D 600
2011-08-11 07:32:36,808 fail2ban.actions: INFO Set banTime =3D 600
2011-08-11 07:32:36,974 fail2ban.jail : INFO Jail 'ssh-ipfw' started =
=
=
=20
=20
$ cat myzonereport.rb
#!/usr/bin/env ruby
# encoding: UTF-8
# ZoneReport version v.02-alpha
# atma@convalesco.org
#require 'socket'
class Myzonereport
attr_reader :logfile
=20
def initialize(logfile)
raise "No fail2ban log file found!" if (logfile.empty?)
@logfile =3D logfile
@list =3D Hash.new
end
=20
def readlog
puts "I can't read the log file" unless (File.readable?(@logfile) || =
File.empty?(@logfile))
log =3D File.read(@logfile)
=
log.scan(/^(\d{4}-\d\d-\d\d).*?(\d{2}:\d{2}:\d{2},\d{3}).*?(Ban).*?(\d{1,3=
}\.\d{1,3}\.\d{1,3}\.\d{1,3})/).each do |date, time, string, ip|
puts "id: #{time} | date: #{date} | IP: #{ip}"
end
end
=20
def rename
time =3D Time.new
date =3D time.strftime("%Y-%m-%d")
if (File.exists?(@logfile) && File.readable?(@logfile))
File.rename(@logfile, @logfile + "-" + date + '.log')
File.new(@logfile)
else
puts "File '#{@logfile}' does not exist or it's not readable!"
end
end
=20
=20
=20
end
x =3D Myzonereport.new('fail2ban.log')
puts x.readlog=1B[1m=1B[3m%=1B[23m=1B[1m=1B[0m =
=
=
=20
=20
$ ruby myzonereport.rb=08
atma@angel:/Volumes/atmosx/Programming/test/ > ruby myzonereport.rb=20
id: 07:37:00,199 | date: 2011-08-08 | IP: 127.0.0.1
id: 07:37:04,328 | date: 2011-08-08 | IP: 127.0.0.1
id: 00:25:38,918 | date: 2011-08-09 | IP: 127.0.0.1
id: 03:58:18,229 | date: 2011-08-09 | IP: 127.0.0.1
id: 06:04:18,785 | date: 2011-08-09 | IP: 127.0.0.1
id: 09:43:32,351 | date: 2011-08-09 | IP: 127.0.0.1
id: 23:07:48,462 | date: 2011-08-09 | IP: 127.0.0.1
id: 23:37:50,235 | date: 2011-08-09 | IP: 127.0.0.1
id: 02:09:32,868 | date: 2011-08-10 | IP: 127.0.0.1
id: 13:41:46,288 | date: 2011-08-10 | IP: 127.0.0.1
id: 22:50:44,647 | date: 2011-08-10 | IP: 127.0.0.1
id: 23:18:48,976 | date: 2011-08-10 | IP: 127.0.0.1
2011-08-08
07:37:00,199
Ban
127.0.0.1
2011-08-08
07:37:04,328
Ban
127.0.0.1
2011-08-09
00:25:38,918
Ban
127.0.0.1
2011-08-09
03:58:18,229
Ban
127.0.0.1
2011-08-09
06:04:18,785
Ban
127.0.0.1
2011-08-09
09:43:32,351
Ban
127.0.0.1
2011-08-09
23:07:48,462
Ban
127.0.0.1
2011-08-09
23:37:50,235
Ban
127.0.0.1
2011-08-10
02:09:32,868
Ban
127.0.0.1
2011-08-10
13:41:46,288
Ban
127.0.0.1
2011-08-10
22:50:44,647
Ban
127.0.0.1
2011-08-10
23:18:48,976
Ban
127.0.0.1
-------------------------------------
I would like to output to be just:
id: 07:37:00,199 | date: 2011-08-08 | IP: 127.0.0.1
id: 07:37:04,328 | date: 2011-08-08 | IP: 127.0.0.1
id: 00:25:38,918 | date: 2011-08-09 | IP: 127.0.0.1
id: 03:58:18,229 | date: 2011-08-09 | IP: 127.0.0.1
id: 06:04:18,785 | date: 2011-08-09 | IP: 127.0.0.1
id: 09:43:32,351 | date: 2011-08-09 | IP: 127.0.0.1
id: 23:07:48,462 | date: 2011-08-09 | IP: 127.0.0.1
id: 23:37:50,235 | date: 2011-08-09 | IP: 127.0.0.1
id: 02:09:32,868 | date: 2011-08-10 | IP: 127.0.0.1
id: 13:41:46,288 | date: 2011-08-10 | IP: 127.0.0.1
id: 22:50:44,647 | date: 2011-08-10 | IP: 127.0.0.1
id: 23:18:48,976 | date: 2011-08-10 | IP: 127.0.0.1
Hope this example makes the issue more clear.
Best Regards!
--
Panagiotis Atmatzidis
personal: atma@convalesco.org
lists: ml@convalesco.org
blog: http://www.convalesco.org
The wise man said: "Never argue with an idiot. They bring you down to =
their level and beat you with experience."