This file contains hidden or 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
# Seth Holloway - https://github.com/smholloway | |
# | |
# The Jekyll Alias Generator, https://github.com/tsmango/jekyll_alias_generator, | |
# is a handy way to create meta refresh redirects from an old URL pattern to the | |
# new. This is helpful when changing blog formats as it helps maintain search | |
# engine rankings. Unfortunately, you have to create your own alias entries. | |
# With over 400 posts, I had # to automate it! This script will find all | |
# Markdown files in your _posts directory then generate an alias entry under the | |
# title attribute. | |
# |
This file contains hidden or 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
# http://www.6blog.us/2013/02/is-polymorphism-faster-in-ruby/ | |
# | |
# Testing the speed of polymorphism in Ruby. This program is based on the Wikipedia article: | |
# http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming | |
# | |
# To run: ruby main.rb <number of runs to time (optional)> | |
# Example: ruby main.rb 5 | |
class Animal | |
def initialize(name) |
NewerOlder