Skip to content

Instantly share code, notes, and snippets.

View tpatch's full-sized avatar

Trevor Patch tpatch

View GitHub Profile
@tpatch
tpatch / content.html
Created October 12, 2011 20:50 — forked from awayken/content.html
New XHTML (Transitional) Website
<h1>Heading 1</h1>
<p>HTML, which stands for <a href="http://en.wikipedia.org/wiki/HTML">HyperText Markup Language</a>, is the predominant markup language for web pages. It provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes and other items. It allows images and objects to be embedded and can be used to create interactive forms. It is written in the form of HTML elements consisting of &quot;tags&quot; surrounded by angle brackets within the web page content. It can embed scripts in languages such as JavaScript which affect the behavior of HTML webpages. HTML can also be used to include Cascading Style Sheets (CSS) to define the appearance and layout of text and other material. The W3C, maintainer of both HTML and CSS standards, encourages the use of CSS over explicit presentational markup.</p>
<h2>Heading 2</h2>
<p>This is <strong>bolded text</strong>. This is <em>italicized text</em>. This is <u>underlined text</u>. This
@tpatch
tpatch / content.html
Created October 12, 2011 20:51 — forked from awayken/content.html
New XHTML (Transitional) Website
<h1>Heading 1</h1>
<p>HTML, which stands for <a href="http://en.wikipedia.org/wiki/HTML">HyperText Markup Language</a>, is the predominant markup language for web pages. It provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes and other items. It allows images and objects to be embedded and can be used to create interactive forms. It is written in the form of HTML elements consisting of &quot;tags&quot; surrounded by angle brackets within the web page content. It can embed scripts in languages such as JavaScript which affect the behavior of HTML webpages. HTML can also be used to include Cascading Style Sheets (CSS) to define the appearance and layout of text and other material. The W3C, maintainer of both HTML and CSS standards, encourages the use of CSS over explicit presentational markup.</p>
<h2>Heading 2</h2>
<p>This is <strong>bolded text</strong>. This is <em>italicized text</em>. This is <u>underlined text</u>. This
@tpatch
tpatch / c2k.css
Created December 28, 2011 22:56
Comic 2 Kindle
@import url(http://fonts.googleapis.com/css?family=Knewave|Amatic+SC:700|Chewy|Cherry+Cream+Soda);
body { background:#777; }
#logo {
position:relative;
margin:40px auto;
text-align:center;
color:#FFF;
width:330px;
}
@tpatch
tpatch / beggining.html
Created December 28, 2011 22:58
Basic HTML Page
<!doctype html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<meta name="author" content="">
@tpatch
tpatch / tables.html
Created December 28, 2011 22:59
Beginning Email Template
<!-- Our outer table, sets width, BG color, email alignment. -->
<table width="100%" cellpadding="0" cellspacing="0" style="background-color:#FFF; margin:0 auto !important;" align="center">
<tbody><tr><td>
<!-- This table will be the shell of our email -->
<table cellpadding="0" cellspacing="0" align="center">
<tr>
</tr>
</table>
@tpatch
tpatch / ContainerTable
Created June 8, 2012 15:24
HTML Email Container Table
<!-- Our outer table, sets width, BG color, email alignment. -->
<table width="100%" cellpadding="0" cellspacing="0" style="background-color:#FFF; margin:0 auto !important;" align="center">
<tbody>
<tr>
<td>
<!-- This table will contain the actual content of the email -->
<table cellpadding="0" cellspacing="0" align="center">
</table>
</td>
<td>
<cfset var image = "" />
<cfset var jFile = "" />
<cfset var pathImage = ExpandPath(arguments.FilePath & "/image.jpg") />
<cffile action="upload" destination="#GetTempDirectory()#" fileField="#arguments.File#" nameconflict="overwrite" />
<cfscript>
image = ImageRead(cffile.SERVERDIRECTORY & "/" & cffile.SERVERFILE);
if (isImage(image)) {
@tpatch
tpatch / gist:52f887c66ec9d269cbbd
Created May 6, 2014 15:39
TJs Update Rotated Image
if (response == "true") $(".image[filename='" + filename + "'] img").src( $(".image[filename='" + filename + "'] img").src() + '?' + Math.random() );
function calcDistance($userLat, $userLon) {
$storeLat = ;
$storeLon = ;
$radlat1 = pi() * $userLat / 180;
$radlat2 = pi() * $storeLat / 180;
$radlon1 = pi() * $userLon / 180;
$radlon2 = pi() * $storeLon / 180;
$theta = $userLat - $storeLat;
$radtheta = pi() * $theta / 180;
nav: function () {
// Uses href attribute containing a section ID;
// Example: <li class="slide-to"><a href="#learnmore">Learn More</a></li>
$('.slide-to').on('click', function(e) {
e.preventDefault();
var sectionId = $(this).children('a').attr('href');
$('html, body').animate({scrollTop:$(".section" + sectionId).position().top - 98}, 'slow');
});
}