Skip to content

Instantly share code, notes, and snippets.

View wontaeyang's full-sized avatar
😬

Wontae Yang wontaeyang

😬
View GitHub Profile
# Git pre-commit hook to check all staged Ruby (*.rb/haml/coffee) files
# for Pry binding references
#
# Installation
#
# ln -s /path/to/pre-commit.sh /path/to/project/.git/hooks/pre-commit
#
# Based on
#
# http://codeinthehole.com/writing/tips-for-using-a-git-pre-commit-hook/
@wontaeyang
wontaeyang / rubocop_local_setup.md
Last active March 22, 2017 17:34
Rubocop lint setup for your editor of choice!

Install RuboCop

install rubocop gem via gem install rubocop

Configuring RuboCop

No need!, config file is included in crystal as .rubocop.yml in app's root directory

Rubocop without editor

# Depth-first-searcher
# a
# / \
# b c
# /|\ \
# d e f g
# |
# h
#
# Write code that can search for a node in a tree.