Skip to content

Instantly share code, notes, and snippets.

View rustyeddy's full-sized avatar
💭
Hacking

Rusty Eddy rustyeddy

💭
Hacking
View GitHub Profile

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil 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. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

/*
* Call this function to place the primary nav bar above the header
*/
function lpo_move_primarynav_above_header()
{
//* Reposition the primary navigation menu
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_before_header', 'genesis_do_nav' );
}

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

@rustyeddy
rustyeddy / genesis-entry-banner.scss
Last active August 29, 2015 14:04
Genesis Entry Title Banner
@mixin title-darkener($start-color:#f7f7f7, $howmuch:15%) {
$end-color: darken( $start-color, $howmuch );
@include radial-gradient( $start-color, $end-color );
border-bottom: 1px solid darken( $start-color, $howmuch / 2 );
}
@mixin title-background($start-color:#f7f7f7, $end-color:#d2d2d2) {
@include radial-gradient( $start-color, $end-color );
border-bottom: 1px solid darken( $end-color, 80% );
}
@rustyeddy
rustyeddy / genesis-entry-title-banner.php
Last active August 29, 2015 14:04
Remove Genesis Post / Entry Title
/**
* This function will remove the title from a post in a Genesis child theme
*/
function gs_remove_entry_title()
{
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
}
@rustyeddy
rustyeddy / category-page.php
Last active August 29, 2015 14:04
Formatting the category pages
if ( is_single() || is_page() ) {
gs_remove_entry_title();
$title = get_the_title();
} else if ( is_author() ) {
$title = get_the_author();
$class .= ' author';
@rustyeddy
rustyeddy / genesis-entry-title-banner.php
Last active August 29, 2015 14:04
Genesis Entry Title Banner
<?php
/**
* This section of code will remove the entry title header from
* the entry itself and place it just below the header with a solid
* background of a different color to give it a stand out effect.
*/
add_action( 'genesis_after_header', 'gs_do_entry_title' );
function gs_do_entry_title()
{
@rustyeddy
rustyeddy / wp_query_variables.php
Last active August 29, 2015 14:13
Properly Handling URL requests in WordPress
/*
* We need to add our query variables
*/
add_filter( 'query_vars', 'mb_register_variables' );
function mb_register_variables( $qv )
{
$qv[] = 'Badge';
$qv[] = 'Username';
$qv[] = 'Password';
return $qv;
@rustyeddy
rustyeddy / animations.scss
Last active August 29, 2015 14:14
Animation Gists see Animate.css for some really cool stuff.
@mixin zoomInDown( $args )
{
-webkit-animation: zoomInDown $args;
-moz-animation: zoomInDown $args;
animation: zoomInDown $args;
}
@mixin zoomOutDown( $args )
{
-webkit-animation: zoomOutDown $args;
@rustyeddy
rustyeddy / success-failure-handlers.html
Created February 1, 2015 19:52
Success and failure handlers for Google Apps Web Apps. Place this in HTML for Google Apps HTML service.
<script>
function onSuccess(numUnread) {
alert('You have ' + numUnread + ' messages');
}
function onFailure(error) {
alert(error.message);
}