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
0:14 [farzy:pts/0] karma% time ruby fib.rb | |
ruby fib.rb 2,42s user 0,30s system 98% cpu 2,757 total | |
[/tmp] | |
0:14 [farzy:pts/0] karma% time ruby1.9 fib.rb | |
ruby1.9: unknown encoding name: None (ArgumentError) | |
ruby1.9 fib.rb 0,02s user 0,01s system 5% cpu 0,509 total |
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 | |
# | |
# Author: Vitalie Lazu <[email protected]> | |
# Date: Sat, 10 Jan 2009 19:12:43 +0200 | |
# | |
# CLI ruby client for Tracks: rails application for GTD methodology | |
# http://www.getontracks.org/development/ | |
# You need to set ENV['GTD_LOGIN'], ENV['GTD_PASSWORD'] |
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/ruby -w | |
# -*- coding: None -*- | |
# vim: sw=2 sts=2: | |
# Tri sans accents | |
$KCODE = 'u' | |
class String | |
def no_accent |
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
# Small example of the use of Ruby for system administration | |
# This sample script does the following: | |
# - Read a text file, "data.in". This is our main data | |
# - Read a list of data patterns, one per line. Each line is just a word or a sentence. | |
# - Suppress each line of the input file that contains one of the patterns | |
# - Output to "data.out" | |
# Version 1: simple syntax without blocks. But the opened files have to be | |
# closed manually if necessary. | |
# Read file as an array of lines |
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
% irb1.8 | |
>> h = Hash.new | |
=> {} | |
>> 10.times { |i| h[i] = i*10 } | |
=> 10 | |
>> h | |
=> {5=>50, 0=>0, 6=>60, 1=>10, 7=>70, 2=>20, 8=>80, 3=>30, 9=>90, 4=>40} |
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
# | |
# Rakefile de contrôle de la migration LDAP / IMAP | |
# | |
# Date : 2009-01-13 | |
# | |
# Copyright (C) 2009 Farzad FARID <[email protected]> | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 3 of the License, or |
OlderNewer