Skip to content

Instantly share code, notes, and snippets.

View mtmcfarl's full-sized avatar

Matthew McFarling mtmcfarl

View GitHub Profile
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] %>
<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>
@mtmcfarl
mtmcfarl / hookable.rb
Last active August 29, 2015 13:56
Example of a web hook
module Hookable
extend ActiveSupport::Concern
def perform_post
end
end
@mtmcfarl
mtmcfarl / unicorn.conf
Created October 17, 2015 12:38 — forked from witscher/unicorn.conf
Upstart script for unicorn, bundler and a user contained rvm installation
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
@mtmcfarl
mtmcfarl / clean-up-boot-partition-ubuntu.md
Created April 27, 2018 14:55 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@mtmcfarl
mtmcfarl / rbenv-ruby187-highsierra.sh
Created June 21, 2018 19:31 — forked from yatsu/rbenv-ruby187-macos.sh
Install ruby-1.8.7 with rbenv on macOS High Sierra (10.13)
#!/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