Skip to content

Instantly share code, notes, and snippets.

Avatar
💀
alter.

gregory nicholas gregorynicholas

💀
alter.
View GitHub Profile
View reset.css
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;
View jquery.plugins.galleriffic.js
/**
* 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 Apr 28, 2011
Apprise: Modal Dialogue Popup
View apprise.1.5.css
.appriseOverlay
{
position:fixed;
top:0;
left:0;
background:rgba(0, 0, 0, 0.3);
display:none;
}
.appriseOuter
{
View html5.contactform.html
<!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
Javascript Browser History Management
View BrowserHistory.Consume.js
// Initialization
// Automated unit testing and other diagnostics
function setURL(url)
{
document.location.href = url;
}
function backButton()
@gregorynicholas
gregorynicholas / detectbrowser.js
Created May 5, 2011
Simple Browser Detection Function
View detectbrowser.js
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
IE7 Javascript Library embed tag.
View ie7-library.js
<!--[if lt IE 9]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->
View css-fonts.css
pbalanced for paragraphs or body copy

t – balanced for headlines or titles
Arial, “Helvetica Neue, Helvetica, sans-serif - p, t
Baskerville, “Times New Roman”, Times, serif - p
Baskerville, 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 Jun 30, 2011
jQuery Google Analytics Javascript Outbound Click Traffic Event Logging
View jquery.ga.outbound.js
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];
View queue.js
/* 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.
You can’t perform that action at this time.