Skip to content

Instantly share code, notes, and snippets.

Web Design Contract

Based on Contract Killer, an open-source contract for web developers.

Summary:

I’ll always do my best to fulfill your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. I have no desire to trick you into signing something that you might later regret. What I do want is what’s best for both parties, now and in the future.

So in short;

You ([CLIENT COMPANY]), located at [CLIENT ADDRESS] are hiring me ([DEVELOPER]) located at [DEVELOPER ADDRESS] to design and develop a web site for the estimated total price of [QUOTE] as outlined in our previous correspondence.

@andyknapp
andyknapp / init.coffee
Last active December 17, 2017 21:57
atom-sync-settings
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
// disable gravity forms confirmation msg anchor functionality
add_filter('gform_confirmation_anchor', create_function('', 'return false;'));
@andyknapp
andyknapp / smoothscroll.js
Created June 13, 2014 20:07
smooth scroll for links on same page (via css-tricks)
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
|| location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
@andyknapp
andyknapp / remove-default-value.js
Created June 8, 2014 17:37
Remove default value on ::focus in gravity forms
jQuery(document).ready(function($) {
$('.gform_wrapper input[type=text], .gform_wrapper input[type=email], .gform_wrapper textarea, .gform_wrapper input[type=tel]').each(function() {
$.data(this, 'default', this.value);
}).focus(function() {
if ($.data(this, 'default') == this.value) {
this.value = '';
$(this).addClass('focus-value');
}
}).blur(function() {
if (this.value == '') {
@andyknapp
andyknapp / menu-toggle.js
Created June 8, 2014 17:35
Custom responsive menu for _s
jQuery(document).ready(function($) {
/* menu toggle */
$('.menu-toggle').click(function() {
$('#site-navigation, .menu-toggle').toggleClass('toggled');
})
});
@andyknapp
andyknapp / triangles.scss
Created June 8, 2014 17:26
Sass mixins for triangles
@mixin rt-triangle($h, $depth, $color, $top: 0, $left: 100%) {
content: '';
display: inline-block;
position: absolute;
top: $top;
left: $left;
width: 0;
height: 0;
border-top: $h/2 solid transparent;
border-left: $h*$depth solid $color;
@andyknapp
andyknapp / register-img-sizes-wp.php
Last active August 29, 2015 14:00
Register image sizes - WordPress
/* register additional image sizes */
function ak_insert_custom_image_sizes( $image_sizes ) {
// get the custom image sizes
global $_wp_additional_image_sizes;
// if there are none, just return the built-in sizes
if ( empty( $_wp_additional_image_sizes ) )
return $image_sizes;
// add all the custom sizes to the built-in sizes
foreach ( $_wp_additional_image_sizes as $id => $data ) {
@andyknapp
andyknapp / no-p-tags.php
Created March 31, 2014 12:31
Strip <p> tags from images within the_content in WordPress
function filter_ptags_on_images($content){
return preg_replace('/<p>\s*(<a .*>)?\s*(<img .* \/>)\s*(<\/a>)?\s*<\/p>/iU', '\1\2\3', $content);
}
add_filter('the_content', 'filter_ptags_on_images');
@andyknapp
andyknapp / nav.js
Created December 19, 2013 22:06
responsive menu adapted from _s to be mobile first. bare bones
( function() {
var container, button, menu;
container = document.getElementById( 'site-navigation' );
if ( ! container )
return;
button = container.getElementsByTagName( 'h1' )[0];
if ( 'undefined' === typeof button )
return;