# Start by stopping the built-in Apache, if it's running, and prevent it from starting on boot.
# This is one of very few times you'll need to use sudo:
sudo launchctl unload /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null
# We need to tap homebrew-dupes because "homebrew-apache/httpd22" relies on "homebrew-dupes/zlib"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var api = "yourApiUrlGoesHere"; | |
/* | |
Method to do a GET request to the service | |
*/ | |
var getService = function (uri, failureFunction, errorFunction, successFunction) | |
{ | |
$.ajax({ | |
cache: true, | |
url: api+uri, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find: | |
\'(\w+)\'\s*=> | |
replace: | |
$1: | |
replace symbol hash rockets with new syntax | |
find: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mailboxes/concerns/mail_params.rb | |
module MailParams | |
extend ActiveSupport::Concern | |
def mail_params | |
attachments = build_attachments | |
body = build_rich_body(attachments) | |
{ subject: mail.subject, body: body, attachments: attachments.map { |a| a[:blob] } } | |
end |