Skip to content

Instantly share code, notes, and snippets.

View travismillerweb's full-sized avatar

Travis Miller travismillerweb

View GitHub Profile
@travismillerweb
travismillerweb / gist:2148506
Created March 21, 2012 15:31
HTML - Starting Template
<html>
<head>
<title> favorites / bookmark title goes here </title>
<link rel = "stylesheet" href = "">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>
</script>
</head>
<?php
//[TM][4/18/2012] Used get sliding menu Bar needle to work and behave accordinglhy per page
//v1.0.0
$domain = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$homepage = "www.sparxoo.com/stack/";
$aboutPage = strpos($domain, "about/");
if ($domain <> $homepage)
@travismillerweb
travismillerweb / index-follow-script.php
Created July 3, 2012 16:53
PHP - Index/Follow Script
<?php
//[TM][6/19/2012] Index-Follow Script
// Another variation of the URL_task script. This one is based on SEO Requirements of redundant pages created by WordPress loops.
//v1.0.0
$domain = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$homepage = "www.[domain].com/";
$reg_meta = "<meta name='robots' content='index, follow' />";
if ($domain <> $homepage)
@travismillerweb
travismillerweb / dynamic-pin-it-button.php
Created July 3, 2012 17:11
PHP - Pin It Button Dynamic Add
<?php
//[TM][5/18/2012]
//Pin it button on Image Gallery
//Used along with jQuery Library and Pinterest social buttion JavaScript
//Not Complete. You must add parameters for pinning a specific image and appending to the a href address
$domain = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$homepage = "www.[domain].com/";
$containsThis = strpos($domain, "image-galleries/");
#header h1 a
{
color:#fff!important;
text-shadow:0 1px 0 #ccc,0 2px 0 #c9c9c9,0 3px 0 #bbb,0 4px 0 #b9b9b9,0 5px 0 #aaa,0 6px 1px rgba(0,0,0,.1),0 0 5px rgba(0,0,0,.1),0 1px 3px rgba(0,0,0,.3),0 3px 5px rgba(0,0,0,.2),0 5px 10px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.2),0 20px 20px rgba(0,0,0,.15);
}
@travismillerweb
travismillerweb / shook-jive.html
Created August 5, 2012 03:11
HTML/JS - Shook and Jive
<html>
<head>
<title> Shook and Jive Animation </title>
<script>
function shake (e, oncomplete, distance, time)
{
if (typeof e ==="string") e = document.getElementById(e);
if (!time) time = 500;
if (!distance) distance = 5;
@travismillerweb
travismillerweb / drag.html
Created August 6, 2012 02:01
HTML/JS - Drag Animation
<html>
<head>
<title> Drag Animation </title>
<script>
//Drag Functionality tutorial from JavaScript: The Difinitive Guide 6th Edition
function getScrollOffsets(w)
{
w = w || window;
@travismillerweb
travismillerweb / image-over-opacity.html
Created August 11, 2012 01:05
jQuery - Image Over Opacity
<html>
<head>
<title>Image over Opacity</title>
<link rel = "stylesheet" href = "">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type = "text/javascript">
jQuery(function(){
$("img").bind({
mouseover:function() {$(this).stop(true).fadeTo(300, 1.0);},
@travismillerweb
travismillerweb / page-class-design.html
Created August 11, 2012 02:17
PHP - Page Class Template
<html>
<head>
<title>#title#</title>
</head>
<body>
@travismillerweb
travismillerweb / controller.php
Created August 12, 2012 18:58
PHP - Simple MVC
<?php
class Controller
{
public $load;
public $model;
function __construct()
{