mkdir -p ~/.git_template/hooks/
#!/bin/sh
if [ -z "$BRANCHES_TO_SKIP" ]; then
 BRANCHES_TO_SKIP=(master develop)| 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) | 
| 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 - | 
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| // 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) { | 
FridayHug.com http://fridayhug.com
The Smallest Rails App http://thesmallestrailsapp.com
%w(action_controller/railtie coderay).each &method(:require)# 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`