Skip to content

Instantly share code, notes, and snippets.

View soynog's full-sized avatar

Nicolas Garcia soynog

  • PillPack
  • Cambridge, MA
View GitHub Profile
NAME_PARTS = {
stems: ["Name", "Bloop", "Fake", "Spoof", "Glorp", "Madeup", "Foob", "Silly",
"Snoop", "Bob", "Winkle", "Snarf", "Zapp", "Dogg", "Sneeez", "Beard"],
first_suffixes: ["y", "er", "o", ""],
last_name_prefixes: ["Mc", "Mac", "Van", "Von", "De", "Da", "O'", "", ""],
last_name_second_suffixes: ["pants", "face", "son", "ford", "noggin", "beard", "name", "dogg", "head"],
}
def fake_name_cleanup(str)
str.gsub('ee','e')
.form-group
%label.col-xs-2.control-label Roles
.col-xs-10
.form-inline
.panel.roles-wrapper.panel-default
.row.panel-body
.col-sm-12
%span.roles-container
.btn.add-role
%span.text-muted add role
@soynog
soynog / gist:ae6a3bf3812e6854dbe58749a95b3012
Last active December 13, 2016 18:57
Weekly Booked Itineraries for Oneclick-PA
date_range = Date.new(2013,1,1)..Date.today
booked_itineraries = Itinerary.valid.visible.where(created_at: date_range).where.not(booking_confirmation: nil)
# Include module parcelable on ActiveRecord::Relation
data = booked_itineraries.parcel_by(date_range, :weekly) {|s,d| [s,d.count]}