Skip to content

Instantly share code, notes, and snippets.

View rmosolgo's full-sized avatar
🧀

Robert Mosolgo rmosolgo

🧀
View GitHub Profile
@rmosolgo
rmosolgo / pre-commit
Last active August 29, 2015 14:01 — forked from tannermares/pre-commit
check for focus and console.log before committing
#!/usr/bin/env ruby
if `git diff --cached spec` =~ /,\s?(:focus|focus:\s?true|:focus\s?=>\s?true)/
puts "\e[31mRemove your :focus tags before committing!\e[0m"
exit 1
end
if `git diff --cached spec` =~ /console\.log/
puts "\e[31mRemove your console.log before committing!\e[0m"
exit 1
@rmosolgo
rmosolgo / README.md
Last active December 14, 2015 22:48 — forked from chrismytton/README.md
Run ruby from inside Markdown. Denote code by leading TAB. (four spaces won't work)

Literate Ruby

Inspired by Literate CoffeeScript.

$ cat hello.litrb
Here's a simple program

    puts "Hello, world"
$ ruby litrb.rb < hello.litrb

Hello, world