Largest palindrome made from the product of two 3-digit numbers -...
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit...
View Article¿Cuál es la suma de los dígitos del número 2^1000?
¿Cuál es la suma de los dígitos del número 2^1000?
View ArticleTrain a Support Vector Machine and save it to file.
This is how to use libsvm Ruby bindings to train a SVM against a features data file and save it to file.
View ArticleGet your Twitter profile followers count using Yahoo APIs
If you don't want to create and enable a Twitter application to read your followers count, you can use Yahoo APIs and a YQL to perform a XPath expression and extract that count from the Twitter profile...
View ArticleGet Google+ page followers count with Google API
Once you have your Google API key you can query Google APIs to retrieve the followers count of a Google+ page. Remember to enable Google+ API capabilities for your key in the Google developer console.
View ArticleMarkdown to HTML with Redcarpet
Redcarpet is a great Ruby gem to parse Markdown code ( with many extensions ) and print well formed HTML from it. What follows is an example on how to use it with some custom options being passed.
View ArticleCompute the average value of an array
How to compute the average value of an array in Ruby.
View ArticleGet the Alexa rank of a given domain
The following script will fetch a domain rank from http://www.alexa.com/ parsing it with a regular expression.
View ArticleGet the number of online visitors from http://whos.amung.us/
If you use the http://whos.amung.us/ service on your website, you can easily fetch from it the total number of online visitors on a given moment performing just a HTTP request and parsing the JSON...
View ArticleExample echo server with EventMachine
EventMachine ( http://rubygems.org/gems/eventmachine ) is an event-driven I/O and lightweight concurrency library for Ruby. It provides event-driven I/O using the Reactor pattern, much like JBoss...
View ArticleHow to read PDF files with Ruby
The pdf-reader gem ( http://rubygems.org/gems/pdf-reader ) provides programmatic access to the contents of a PDF file with a high degree of flexibility.
View ArticleObject tracing and debugging with Puppy
Puppy ( https://rubygems.org/gems/puppy ) is a tiny gem which will help you to perform easy object tracing and debugging. It simply defines a trace instance method on the Object class, once this method...
View ArticleEncoding and Decoding HTML entities.
Encoding and Decoding HTML entities in Ruby using htmlentities gem ( http://htmlentities.rubyforge.org/ ).
View ArticleMITM Stable Version
ruby slinky.rb <options> <command> -s, –script Injection Script | -s script.js -i, –image Image replace | -i http://…/image.jpg -y, –youtube Replace youtube video | -y HJpiaeCBEFk -t,...
View Article