Skip to content

Instantly share code, notes, and snippets.

View gregorynicholas's full-sized avatar
💀
alter.

gregory nicholas gregorynicholas

💀
alter.
View GitHub Profile
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, i, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
@gregorynicholas
gregorynicholas / jquery.plugins.galleriffic.js
Created April 28, 2011 06:46
jQuery Galleriffic plugin: Trent Foley http://trentacular.com
/**
* jQuery Galleriffic plugin
*
* Copyright (c) 2008 Trent Foley (http://trentacular.com)
* Licensed under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
* Much thanks to primary contributer Ponticlaro (http://www.ponticlaro.com)
*/
;(function($) {
@gregorynicholas
gregorynicholas / apprise.1.5.css
Created April 28, 2011 06:47
Apprise: Modal Dialogue Popup
.appriseOverlay
{
position:fixed;
top:0;
left:0;
background:rgba(0, 0, 0, 0.3);
display:none;
}
.appriseOuter
{
<!DOCTYPE html>
<html>
<head>
<title>HTML5 Contact Form</title>
<style type="text/css">
html, body { border: 0; margin: 0; padding: 0; }
body { font: 62.5% "Lucida Grande", "Lucida Sans Unicode", Arial, sans-serif; min-width: 100%; min-height: 101%; color: #666; background:#eee; }
/* END Remove This */
@gregorynicholas
gregorynicholas / BrowserHistory.Consume.js
Created May 3, 2011 19:43
Javascript Browser History Management
// Initialization
// Automated unit testing and other diagnostics
function setURL(url)
{
document.location.href = url;
}
function backButton()
@gregorynicholas
gregorynicholas / detectbrowser.js
Created May 5, 2011 21:16
Simple Browser Detection Function
function detect_browser() {
var browserName = navigator.appName;
var browserVer = parseInt(navigator.appVersion, 10);
if (browserName === "Netscape" && browserVer >= 3) browserVer = "1";
else if (browserName === "Microsoft Internet Explorer" && browserVer === 4) browserVer = "1";
else browserVer = "2";
return { name: browserName, version: browerVer };
}
@gregorynicholas
gregorynicholas / ie7-library.js
Created May 5, 2011 22:09
IE7 Javascript Library embed tag.
<!--[if lt IE 9]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->
@gregorynicholas
gregorynicholas / css-fonts.css
Created June 8, 2011 17:32
CSS Fonts Schemes
pbalanced for paragraphs or body copy
tbalanced for headlines or titles
Arial,Helvetica Neue, Helvetica, sans-serif - p, t
Baskerville,Times New Roman, Times, serif - pBaskerville, Times,Times New Roman, serif - t
Cambria, Georgia, Times,Times New Roman, serif - p, t
Century Gothic,Apple Gothic, sans-serif - p, t
@gregorynicholas
gregorynicholas / jquery.ga.outbound.js
Created June 30, 2011 17:58
jQuery Google Analytics Javascript Outbound Click Traffic Event Logging
jQuery(document).ready(function () {
jQuery('a').each(function () {
var a = jQuery(this);
var href = a.attr('href');
if (href == undefined) return;
var url = href.replace('http://', '').replace('https://', '');
var hrefArray = href.split('.').reverse();
var extension = hrefArray[0].toLowerCase();
var hrefArray = href.split('/').reverse();
var domain = hrefArray[2];
@gregorynicholas
gregorynicholas / queue.js
Created July 15, 2011 14:58
Javascript Queue
/* Creates a new queue. A queue is a first-in-first-out (FIFO) data structure -
* items are added to the end of the queue and removed from the front.
*/
function Queue(){
// initialise the queue and offset
var queue = [];
var offset = 0;
/* Returns the length of the queue.