Skip to content

Instantly share code, notes, and snippets.

View JanDintel's full-sized avatar

JanDintel

View GitHub Profile
@JanDintel
JanDintel / infrastructure_controller.rb
Last active December 23, 2015 06:39
InfrastructureController to support Nagios health check
# app/controllers/infrastructure_controller.rb
class InfrastructureController < ActionController::Base
def health_check
@checks = { database: ActiveRecord::Migrator.current_version,
redis: redis_check,
version: %x(git log --pretty=format:'%h' -1) }
if @checks[:redis] == "Not connected"
@notification = "Error 500, Can't find Redis"
@JanDintel
JanDintel / Git aliases
Last active December 23, 2015 04:59 — forked from JobV/Git aliases
git config --global alias.co checkout
git config --global alias.st status
git config --global alias.br branch
git config --global alias.com commit
git config --global alias.pl pull
git config --global alias.ps push
@JanDintel
JanDintel / install.md
Last active July 20, 2016 10:57
Install guide for Rspec, Guard, Spork, Cucumber and Mongoid

Install Cucumber with Rspec, Guard, Factory Girl(?) and Spork

Using during Hartl rails 4.0 guide (http://ruby.railstutorial.org/chapters)

Gems

group :development, :test
  gem 'guard-rspec'
  gem 'guard-livereload'
  gem 'spork-rails', github: 'sporkrb/spork-rails' # rubygems version not rails 4 compatible
  gem 'guard-spork'