Skip to content

Instantly share code, notes, and snippets.

@tadejm
tadejm / spork.diff
Last active December 28, 2015 09:59 — forked from anonymous/-
diff --git a/Guardfile b/Guardfile
index 8382d1c..5009879 100644
--- a/Guardfile
+++ b/Guardfile
@@ -9,16 +9,10 @@ guard 'spork', :cucumber => false, :rspec_env => { 'RAILS_ENV' => 'test' } do
watch('Gemfile')
watch('Gemfile.lock')
watch('spec/spec_helper.rb') { :rspec }
- watch(%r{features/support/}) { :cucumber }
- watch(%r{^app/models/.+\.rb$})
  • add prepare-commit-msg it to ./.git/hooks/
  • Make it executable (chmod +x filename)

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:

  • The branch doesn't end in a story id (integer)
  • The original commit message starts with "Merge"
@tadejm
tadejm / slack_delete.rb
Last active September 24, 2017 19:04 — forked from jamescmartinez/slack_delete.rb
This Ruby script will bulk remove all non starred Slack files older than 30 days. Just add your API token from https://api.slack.com/web#authentication into the token quotes at the top of the file.
require 'net/http'
require 'json'
require 'uri'
@token = ''
def list_files
ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago
params = {
token: @token,
@tadejm
tadejm / db_guidelines.md
Created September 7, 2022 11:54 — forked from adamrdavid/db_guidelines.md
the darndest things