Ruby

TwitterFacebook
Get flash to fully experience Pearltrees

Ruby for systems administrators

http://www.ibm.com/developerworks/aix/library/au-rubysysadmin/index.html?cmp=dw&cpb=dwaix&ct=dwgra&cr=twitter&ccy=zz&csr=doit81rubu4admins Introduction Ruby is a highly feature-rich, free, simple, extensible, portable, and object-oriented scripting language. It has gained immense popularity of late on the worldwide Web. This popularity can at least partly be attributed to the very powerful Web application development framework, Rails, which is written in Ruby.

Ruboto: Ruby on Android

http://www.ibm.com/developerworks/web/library/wa-ruby/index.html?cmp=dw&cpb=dwwdv&ct=dwgra&cr=twitter&ccy=zz&crs=ruboto4android Introduction Most of the interesting work in software development today occurs at one of the two extremes: huge cloud servers and tiny mobile devices. These domains solve significantly different problems, and, correspondingly, have different tool support. Server development often uses scripting languages to tie together different components and accomplish sophisticated automated tasks, while mobile development focuses on the particular capabilities and needs of a particular device and user. However, these two extremes share a common language: Java™. Whether Android or the Spring framework, many of the most popular technologies today have adopted a language that's widely understood and supported around the world.
1 filename = ' data.csv ' 2 file = File . new (filename, ' r ' ) 3 4 file. each_line ( " \n " ) do | row | 5 columns = row. split ( " , " ) 6 7 break if file. lineno > 10 8 end 1 require ' rubygems ' 2 require ' faster_csv ' 3 4 FasterCSV . foreach ( " data.csv " , : quote_char => ' " ' , : col_sep => ' ; ' , : row_sep => : auto ) do | row | 5 puts row[ 0 ] 6 end http://snippets.aktagon.com/snippets/246-How-to-parse-CSV-data-with-Ruby

How to parse CSV data with Ruby - Ruby - csv, parse, ruby, fastercsv, ccsv, csvscan, excelsior

url = URI.parse( db_url ) http = Net::HTTP.new( url.host, url.port ) http.use_ssl = true if url.port == 443 http.verify_mode = OpenSSL::SSL::VERIFY_NONE if url.port == 443 path = url.path + "?" + url.query res, data = http.get( path ) case res when Net::HTTPSuccess, Net::HTTPRedirection # parse link doc = Nokogiri::HTML(data) a = doc.xpath("//item") b = [] a.each do |z| b http://railsforum.com/viewtopic.php?id=36340

Connect to https site with Nokogiri (Page 1) - Controllers and Views - Rails Forum - Ruby on Rails Help and Discussion Forum

Programmation Ruby/Types standards - Wikibooks

Un livre de Wikibooks. Nous allons voir ici tous les types que nous pouvons considérer comme "standards", dans le sens où nous les retrouvons dans la plupart des langages, et que ceux-ci sont directement intégrés à l'interpréteur ( built-in ). Néanmoins il ne faut pas perdre de vue qu'il s'agit en réalité d'objets. En ruby les chaînes de caractères sont représentées par l'objet " String ". En réalité cet objet contient et permet la manipulation d'un nombre indéfini d'octets, typiquement des caractères, nous pourrons néanmoins y stocker tout type de données binaires ou non. Mais le moyen le plus courant de créer une chaîne est de la placer entre simple quote (') ou entre double quote ("). http://fr.wikibooks.org/wiki/Programmation_Ruby/Types_standards#split
http://www.zenspider.com/Languages/Ruby/QuickRef.html

Ruby QuickRef

alias and BEGIN begin break case class def defined? do else elsif END end ensure false for if in module next nil not or redo rescue retry return self super then true undef unless until when while yield 'no interpolation' "#{interpolation}, and backslashes\n" %q(no interpolation) %Q(interpolation and backslashes) %(interpolation and backslashes) `echo command interpretation with interpolation and backslashes` %x(echo command interpretation with interpolation and backslashes)

Getting Started with Nokogiri | Engine Yard Ruby on Rails Blog

http://www.engineyard.com/blog/2010/getting-started-with-nokogiri/ We’re decided to mix up the Engine Yard blog a little and invite some community members to contribute guest posts. This one (our first!) is from Aaron Patterson — a long-time member of the Ruby community, and the creator of Nokogiri.
Ruby on Rails is a new kid in the block into the world of Web application development that is rapidly gaining interest, even though it is in beta versions. These days, I am trying to get my hands dirty with Ruby on Rails using various tutorial posts and also some books. Over the coming days, i will try to share my learnings with you through the blog.

Top 5 Tutorials on Ruby on Rails

http://technofriends.in/2007/10/26/top-5-tutorials-on-ruby-on-rails/

Ruby in Twenty Minutes

http://www.ruby-lang.org/en/documentation/quickstart/ Introduction This is a small Ruby tutorial that should take no more than 20 minutes to complete. It makes the assumption that you already have Ruby installed.