##Short Bus Brown Ale
###Grains
- 40L 8oz
- Special B 4oz
- Chocolate Rye 2oz
###Malt
- Amber 10lb (liquid extract)
1st public gist..this is pretty cool |
tweaked my copy of showoff to work with ruby 1.9 | |
see changes here | |
http://github.com/schacon/showoff/commit/e01d4ef29b204e5674bacff208c3d9ac63bae338 | |
not sure why the gem i d/l'ed didn't have this change. | |
suits = %w{ C D H S } | |
ranks = [ *'2'..'10', *%w{ J Q K A } ] | |
deck = suits | |
.product(ranks) | |
.map(&:join) | |
hands = deck | |
.shuffle | |
.each_slice(13) | |
puts hands.first.join(", ") |
package foo; | |
import java.util.Set; | |
import javax.validation.ConstraintViolation; | |
import javax.validation.Validation; | |
import javax.validation.Validator; | |
import javax.validation.ValidatorFactory; | |
import org.hibernate.validator.constraints.ScriptAssert; |
#git vcprompt settings -> https://github.com/xvzf/vcprompt | |
alias vcp="vcprompt --format '(%b:%h)'" | |
export PS1='\u@\h:\w $(vcp)\$' |
#ActiveRecord scoped query left outer join users to members | |
scope :not_in_group, lambda { |group| | |
join_clause = User.send(:sanitize_sql_array, | |
["LEFT OUTER JOIN memberships ON memberships.user_id = users.id WHERE memberships.group_id is not ?", group ]) | |
User.select("distinct(users.id), users.*").joins(join_clause) | |
} |
#Add this to your .bashrc file in Ubuntu. Make sure you have the right libs | |
alias not='notify-send "Build done in DIR: $PWD"' | |
#bd a function to run an ant target AND be notified about it. | |
function bd { | |
if [ -z "$1" ]; then | |
ant publish; | |
notify-send "Build done for target (publish) in DIR: $PWD" | |
else |
require 'nokogiri' | |
puts "Start formatting git log to remove stuff after the @.." | |
doc = Nokogiri::HTML(open('log.xml')) | |
doc.css('event @author').each do |author| | |
name = author.content | |
author.content = name[0,name.index('@')] | |
end |
##Short Bus Brown Ale
###Grains
###Malt
#!/bin/bash | |
############################################################################## | |
# Find any dirty git projects in the current working directory | |
# and recursively beneath this directory | |
# copied with thanks to Matthew from | |
# https://github.com/matthewmccullough/scripts/blob/master/finddirtygit | |
# | |
# USAGE: | |
# finddirtygit |