Skip to content

Instantly share code, notes, and snippets.

View bobmeister's full-sized avatar

Bob Haupt bobmeister

  • Springville, UT, USA
View GitHub Profile
@bobmeister
bobmeister / challenge.rb
Created June 18, 2014 15:55
BeQuick Coding Challenge
#!/usr/bin/ruby
# Usage: ruby challenge.rb < dictionary.txt
class String
def insert_unique_four_char_sequences_into_hash(sequences)
tmp = self.dup
while tmp.size >= 4
sequence = tmp[-4..-1] # Last 4 chars
if sequences[sequence]
HEADS UP! Haml 4.0 has many improvements, but also has changes that may break
your application:
* Support for Ruby 1.8.6 dropped
* Support for Rails 2 dropped
* Sass filter now always outputs <style> tags
* Data attributes are now hyphenated, not underscored
* html2haml utility moved to the html2haml gem
* Textile and Maruku filters moved to the haml-contrib gem