# config/initializers/clear_logs.rb
if Rails.env.development?
  MAX_LOG_SIZE = 2.megabytes
  
  logs = File.join(Rails.root, 'log', '*.log')
  if Dir[logs].any? {|log| File.size?(log).to_i > MAX_LOG_SIZE }
    $stdout.puts "Runing rake log:clear"
 `rake log:clear`FridayHug.com http://fridayhug.com
The Smallest Rails App http://thesmallestrailsapp.com
%w(action_controller/railtie coderay).each &method(:require)
  
    
      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
    
  
  
    
  | // Module requirements | |
| var express = require('express'); | |
| // The variables | |
| var user = 'myUsername'; | |
| var pass = 'myPassword'; | |
| var basicAuthMessage = 'Restrict area, please identify'; | |
| // The function | |
| var basicAuth = express.basicAuth(function(username, password) { | 
Ctrl + a     # go to the start of the command line
Ctrl + e     # go to the end of the command line
Ctrl + k     # delete from cursor to the end of the command line
Ctrl + u     # delete from cursor to the start of the command line
Ctrl + w     # delete from cursor to start of word (i.e. delete backwards one word)
Ctrl + y     # paste word or text that was cut using one of the deletion shortcuts (such as the one above) after the cursor
Ctrl + xx    # move between start of command line and current cursor position (and back again)
Ctrl + f     # move forward one character
  
    
      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
    
  
  
    
  | mkdir ~/vim | |
| cd ~/vim | |
| # Staically linked vim version compiled from https://github.com/ericpruitt/static-vim | |
| # Compiled on Jul 20 2017 | |
| curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz | |
| export VIMRUNTIME="$HOME/vim/runtime" | |
| export PATH="$HOME/vim:$PATH" | |
| cd - | 
  
    
      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
    
  
  
    
  | def word_hash | |
| hash = {} | |
| Hash.new(0) | |
| ('a'..'z').to_a.each_with_index do |e, i| | |
| hash[e] = i + 1 | |
| end | |
| hash | |
| end | |
| def word_points(word) |