$ uname -r
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
#!/bin/sh | |
# 1) Install HomeBrew | |
# 2) brew install openssl gcc@4.9 rbenv | |
# 3) Setup rbenv | |
CC=gcc-4.9 \ | |
CFLAGS="-O2 -fno-tree-dce -fno-optimize-sibling-calls -I$(brew --prefix openssl)/include" \ | |
LDFLAGS="-L$(brew --prefix openssl)/lib" \ | |
rbenv install 1.8.7-p375 |
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
description "Unicorn" | |
# starting unicorn with bundler, and a user contained rvm: | |
start on filesystem or runlevel [2345] | |
stop on runlevel [!2345] | |
chdir /path/to/current |
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
module Hookable | |
extend ActiveSupport::Concern | |
def perform_post | |
end | |
end |
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
<div class="row"> | |
<%= form_tag("/contact", method: "post") do %> | |
<label class="control-label">First Name</label> | |
<input type="text" name="contact[first_name]" /> | |
<label class="control-label">Last Name</label> | |
<input type="text" name="contact[last_name]" /> | |
<label class="control-label">Company Name</label> |
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
Contact Request | |
=============== | |
Here's what they had to say: | |
Name: <%= @contact[:first_name] %> <%= @contact[:last_name]%> | |
Company: <%= @contact[:company] %> | |
Email: <%= @contact[:email] %> | |
Phone: <%= @contact[:phone] %> |
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
class ContactFormMailer < ActionMailer::Base | |
def contact_request(contact) | |
@contact = contact | |
from_addr = "#{@contact[:first_name]} #{@contact[:last_name]} <#{@contact[:email]}>" | |
mail(to: "your-email-address@your-domain.com", from: from_addr, subject: 'Contact Form Request') | |
end | |
end |
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
class ContactsController < ApplicationController | |
def create | |
ContactFormMailer.contact_request(contact_params).deliver | |
render action: :thanks | |
end | |
protected | |
def contact_params | |
params[:contact].permit! |
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
0 INFO [main] utilities.LoggingSetup - {java.runtime.name=Java(TM) SE Runtime Environment, sun.boot.library.path=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries, java.vm.version=20.51-b01-457, awt.nativeDoubleBuffering=true, gopherProxySet=false, mrj.build=11M4509, java.vm.vendor=Apple Inc., java.vendor.url=http://www.apple.com/, path.separator=:, java.vm.name=Java HotSpot(TM) 64-Bit Server VM, file.encoding.pkg=sun.io, sun.java.launcher=SUN_STANDARD, user.country=US, sun.os.patch.level=unknown, java.vm.specification.name=Java Virtual Machine Specification, user.dir=/Volumes, java.runtime.version=1.6.0_51-b11-457-11M4509, java.awt.graphicsenv=apple.awt.CGraphicsEnvironment, java.endorsed.dirs=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/endorsed, os.arch=x86_64, java.io.tmpdir=/var/folders/34/qn5pdvbj5m39fwr_tj11ptkm0000gn/T/, line.separator= | |
, java.vm.specification.vendor=Sun Microsystems Inc., os.name=Mac OS X, sun.jnu.encoding=MacRoman, java.library.path=. |
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
class VendorContactPresenter < BasePresenter | |
def initialize(contact) | |
@contact = contact | |
end | |
def full_name | |
"#{@contact.first_name} #{@contact.last_name}" | |
end | |
def email |
NewerOlder