Skip to content

Instantly share code, notes, and snippets.

View kenzie's full-sized avatar

Kenzie Campbell kenzie

View GitHub Profile

Notes

This is the latest version of an email which I send periodically, offering customers the opportunity to pre-pay for SaaS in return for a discount. The benefits to the SaaS company are better cash flow and reduced churn rate. The benefits to the customer are, well, in the email. This genre of email has produced hundreds of thousands of dollars in pre-pays for some companies I work with, and it rarely requires any more work than this example.

I've put $79 is as a placeholder for the cost of the user's plan. We calculate that for each account, naturally, along with the billing contact's name.

Subject: Save $79 on Appointment Reminder (and get a tax write-off) Formatting: 100% plain text. Gmail automatically links up the central link. From: Patrick McKenzie (Appointment Reminder) patrick@appointmentreminder.org

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@kenzie
kenzie / craft.conf
Last active May 17, 2018 17:48
Nginx virtual host configuration for Craft CMS, PHP5-FPM, NGINX 1.2.1 and craft/config/general.php for friendly URLs.
server {
listen 80;
root /var/www/craft.dev/public;
index index.php index.html index.htm;
server_name craft.dev;
location / {
try_files $uri $uri/ @rewrites;
@kenzie
kenzie / .profile
Created June 6, 2012 13:14
Start MongoDB and Redis daemons from the command line (OS X)
# add these aliases to your BASH profile ~/.profile
alias mongodb-start="mongod run --config /usr/local/etc/mongod.conf"
alias redis-start="redis-server /usr/local/etc/redis.conf"
# TODO add stop commands
@kenzie
kenzie / wrap-erb-tags.sublime-snippet
Created May 25, 2012 15:13
Sublime Text 2 snippet for wrapping selection in erb tags
<snippet>
<content><![CDATA[
<%= ${0:$TM_SELECTED_TEXT} %>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<!-- <tabTrigger>hello</tabTrigger> -->
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.erb</scope> -->
<description>&lt;%= … %&gt;</description>
@kenzie
kenzie / _error_messages.html.erb
Created September 13, 2011 12:47
Rails 3 form error partial
<% if target.errors.any? %>
<div class="error_explanation">
<h2><%= pluralize(target.errors.count, "error") %> prevented this record from being saved:</h2>
<ul>
<% target.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
@kenzie
kenzie / Gemfile
Created September 12, 2011 23:48
Rails 3 default Gemfile
source 'http://rubygems.org'
gem 'rails', '3.1.0'
gem 'jquery-rails'
group :assets do
gem 'sass-rails', " ~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end
@kenzie
kenzie / application.rb
Created September 12, 2011 23:47
Rails 3 wrap field errors in spans
# wrap errors in span
config.action_view.field_error_proc = Proc.new { |html_tag, instance| "<span class=\"field_with_errors\">#{html_tag}</span>".html_safe }
@kenzie
kenzie / string_indent.rb
Created August 16, 2011 12:49
Add an indent method to String.
class String
# adds tabs to the beginning of each line
def indent(tabs=4)
self.gsub(/^/, "\t"*tabs)
end
end
@kenzie
kenzie / crontab
Created June 15, 2011 23:13
Wifi Switch via Cron on a Mac
# open Terminal.app
# sudo crontab -e
MAILTO=email@address.com
# networksetup -setairportnetwork <network> <device name> [password]
0 9 * * 1-5 /usr/sbin/networksetup -setairportnetwork AirPort "3G" "password"
0 17 * * 1-5 /usr/sbin/networksetup -setairportnetwork AirPort "DSL" "password"