- Avoids files with debugger/binding.pry to be commited
- Avoids files with spaces in the end of the line to be commited
- Copy the file to
.git/hooks/pre-commit
- Make it executable
chmod + x .git/hooks/pre-commit
- Have fun
prepare-commit-msg
it to ./.git/hooks/It should prepend [#STORY_ID]
into your commit message when the editor pops up.
Your branch must be in this format to work: branch-description-blabla-STORY_ID
it skips the prepaend if:
" Copyright (C) 2006 Mauricio Fernandez <[email protected]> | |
" rcodetools support plugin | |
" | |
if exists("loaded_rcodetools") | |
finish | |
endif | |
let loaded_rcodetools = 1 | |
let s:save_cpo = &cpo |
# Simple KDTree class with sorting for finding nearest neighbor | |
# | |
class KDTree | |
class Node < Struct.new(:value, :left, :right) | |
# Public: Returns the distance of the object to the | |
# point | |
# | |
def distance_to(point) | |
throw "Points have different dimensions" if point.size != value.size | |
square_sum = 0 |
require 'formula' | |
class Vim < Formula | |
homepage 'http://www.vim.org/' | |
version '7.3.666' | |
url 'https://vim.googlecode.com/hg/', :revision => '1e22adc6176e' | |
head 'https://vim.googlecode.com/hg/' | |
def ruby_bin |
namespace :ts do | |
desc "Run Thinking Sphinx in the foreground (for something like foreman)" | |
task :run_in_foreground => ['ts:stop', 'ts:index'] do | |
config = ThinkingSphinx::Configuration.instance | |
controller = config.controller | |
unless pid = fork | |
exec "#{controller.bin_path}#{controller.searchd_binary_name} --pidfile --config #{config.configuration_file} --nodetach" | |
end |
require 'spec_helper' | |
describe FactoryGirl do | |
FactoryGirl.factories.each do |factory| | |
context "with factory for :#{factory.name}" do | |
subject {FactoryGirl.build(factory.name)} | |
it "is valid" do | |
subject.valid?.should be, subject.errors.full_messages.join(',') | |
end |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'aws/s3' | |
## USAGE | |
# | |
# If you use a directory as parameter, every file inside it will be uploaded. | |
# ex: ./s3_upload_files /system/backups/ | |
# If you use a text file as parameter, it should have one file name per line, all files listed will be uploaded. | |
# ex: ./s3_upload_files changeset |
# .... | |
gem 'aws-s3' | |
# .... |