Skip to content

Instantly share code, notes, and snippets.

Gabe Shackle hereswhatidid

Block or report user

Report or block hereswhatidid

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hereswhatidid
hereswhatidid / HTMLElements.html
Created Apr 5, 2012
Styleguide of HTML Elements
View HTMLElements.html
<!-- Sample Content to Plugin to Template -->
<h1>CSS Basic Elements</h1>
<p>The purpose of this HTML is to help determine what default settings are with CSS and to make sure that all possible HTML Elements are included in this HTML so as to not miss any possible Elements when designing a site.</p>
<hr />
<h1 id="headings">Headings</h1>
<h1>Heading 1</h1>
@hereswhatidid
hereswhatidid / jquery.placeholder.js
Created Jun 14, 2012
Check for and enable HTML5 placeholder attribute
View jquery.placeholder.js
$.support.placeholder = ('placeholder' in document.createElement('input'));
if (!$.support.placeholder) {
$('input[placeholder],email[placeholder]').each(function() {
$(this)
.val($(this).attr('placeholder'))
.on({
'focus': function() {
if ($(this).val() == $(this).attr('placeholder')) $(this).val('');
},
'blur': function() {
View jquery.rotator.js
(function( $ ){
$.fn.rotateit = function( options ) {
//
// Plugin settings with defaults set
//
// -----------------------------------------------------
var settings = $.extend( {
'shownav' : true,
'backnext' : false,
@hereswhatidid
hereswhatidid / clickbodytohide.js
Created Jul 26, 2012
Model click to remove scripts
View clickbodytohide.js
$('html').click(function() {
//Hide the menus if visible
});
$('#menucontainer').click(function(event){
event.stopPropagation();
});
@hereswhatidid
hereswhatidid / Container.ascx
Created Aug 7, 2012
Add class to outer div in DotNetNuke containers
View Container.ascx
<%@ Control language="c#" AutoEventWireup="true" Explicit="True" Inherits="DotNetNuke.UI.Containers.Container" %>
<%@ Register TagPrefix="dnn" TagName="TITLE" Src="~/Admin/Containers/Title.ascx" %>
<script runat="server">
protected void Page_PreRender(object sender, EventArgs e) {
try {
HtmlGenericControl cParent = (HtmlGenericControl) this.Parent;
cParent.Attributes["class"] += " tab";
} catch (Exception ex) {
// do nothing
}
@hereswhatidid
hereswhatidid / tabs.js
Created Aug 7, 2012
Create Tabs from divs
View tabs.js
//
// Tabbed containers
//
// -----------------------------------------------------
if ($('.tab').length > 1) {
var tabnav = $('<div class="tabs-nav"><ul /></div>'),
tabs = $('<div class="tabs" />'),
tabobject = $('<div class="tabbed-content span9" />'),
activefound = false,
tabwidth = 100 / $('.tab').length;
@hereswhatidid
hereswhatidid / web.config
Created Sep 18, 2012
IIS config file for setting cache header expiration
View web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="14.00:00:00" />
</staticContent>
</system.webServer>
</configuration>
@hereswhatidid
hereswhatidid / web.config
Created Nov 16, 2012
IIS config file for setting a Vary: Accept-Encoding header
View web.config
<?xml version="1.0" encoding="UTF-8"?>
<system.webServer>
<httpProtocol>
<customHeaders>
<remove name="Vary"></remove>
<add name="Vary" value="Accept-Encoding"></add>
</customHeaders>
</httpProtocol>
</system.webServer>
@hereswhatidid
hereswhatidid / nav.walker.blank.php
Created Dec 7, 2012
WordPress blank navigation walker
View nav.walker.blank.php
<?php
//
// Blank navigation list Walker
//
// -----------------------------------------------------
class Blank_Walker extends Walker_Nav_Menu
{
/**
* Start the element output.
*
@hereswhatidid
hereswhatidid / wp-config.php
Last active Dec 16, 2015
Useful wp-config.php options for WordPress
View wp-config.php
<?php
// Disable reinstalling Akismet and Hello, Dolly! plugins
// when upgrading WordPress core
define( 'CORE_UPGRADE_SKIP_NEW_BUNDLED', true);
// Disable built-in file editor
define('DISALLOW_FILE_EDIT', TRUE)
You can’t perform that action at this time.