Skip to content

Instantly share code, notes, and snippets.

View treyconnell's full-sized avatar

Trey Connell treyconnell

View GitHub Profile
# URI: PUT /admin/retrieve-password
def retrieve_password
if admin = retrieve_password_valid?
password = User.generate_random_password
sites = update_password(params[:email], password)
if sites.present?
flash.notice = blurb(:admin_password_reset_notice) + site_list(sites)
AdminMailer.reminder(admin, password).deliver
else
flash.alert = blurb(:admin_password_not_changed)
@treyconnell
treyconnell / gist:7777467
Created December 3, 2013 21:07
indiana.lawyer site build failure
[trey@core-test1 site]$ ant publish-rc
Buildfile: /web/project/indiana.lawyer/site/build.xml
init:
[echo] ========== Building indiana.lawyer.site ==========
clean:
init2:
@treyconnell
treyconnell / gist:3945294
Created October 24, 2012 10:03 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@treyconnell
treyconnell / gist:3935767
Created October 23, 2012 00:15
Article Helpers
# Public: Displays the kicker field for an article
#
# article - the Article you want to display the kicker for
# element - a String representing the html element you want surrounding the kicker
# clazz - a String representing the class of the html element
# attributes - a Hash of addition attributes to place in the html element
#
# Examples
#
# article_kicker(my_article)