Skip to content

Instantly share code, notes, and snippets.

View michaelbragg's full-sized avatar

Michael Bragg michaelbragg

View GitHub Profile
{
"auto_complete_commit_on_tab": true,
"color_scheme": "Packages/Color Scheme - Default/Blackboard.tmTheme",
"dictionary": "Packages/Language - English/en_GB.dic",
"font_size": 16,
"hot_exit": false,
"show_tab_close_buttons": false,
"tab_size": 2,
"spell_check": true,
"translate_tabs_to_spaces": true,
@michaelbragg
michaelbragg / navicon.html
Created November 14, 2012 17:52
Basic Mobile Navicon Navigation
<!DOCTYPE html>
<html>
<head>
<title>Basic Mobile Navicon Navigation</title>
<style>
.navicon {
cursor: pointer;
@michaelbragg
michaelbragg / index.html
Last active December 14, 2015 09:09
Demo of Media Query Dependant Javascript using YepNope
<script>
Modernizr.load([
{
test: Modernizr.mq("only screen and (max-width: 320px)"),
yep: 'mobile.js'
},
{
test: Modernizr.mq("only screen and (min-width: 321px)"),
yep: 'desktop.js'
}
@michaelbragg
michaelbragg / fluid-nav.html
Created March 27, 2013 10:04
Fluid navigation for distributing all items evenly.
<!Doctype html>
<html>
<head>
<title>Fluid Navigation</title>
<!-- Only for testing purposes -->
<link rel="stylesheet" type="text/css" href="http://necolas.github.com/normalize.css/2.1.0/normalize.css">
@michaelbragg
michaelbragg / css.css
Created April 16, 2013 14:53
jQuery Toggle
/*
// Hide only visually, but have it available for screenreaders: h5bp.com/v
*/
.visuallyhidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
@michaelbragg
michaelbragg / nav-tabs.html
Created May 31, 2013 16:23
Menu Tabs for Coventry Telegraph Business Awards 2012 & 2013 website
<!DOCTYPE html>
<html>
<head>
<style>
<!--
* {
padding: 0;
margin: 0;
@michaelbragg
michaelbragg / functions.php
Created June 17, 2014 09:48
WordPress lt-ie8
/**
* HTML5 Shiv
* Enables use of HTML5 sectioning elements in legacy Internet
* Explorer and provides basic HTML5 styling for Internet Explorer 6-9
*/
// add ie conditional html5 shim to header
function add_ie_html5_shim () {
echo '<!--[if lt IE 9]>';
echo '<script src="'. get_stylesheet_directory_uri() .'/js/lib/html5shiv-printshiv.js"></script>';
@michaelbragg
michaelbragg / functions.php
Created September 7, 2015 07:55
Base WordPress child theme functions file to load in both styles sheets from parent and child.
<?php
/**
* Child functions and definitions.
*
* @link https://codex.wordpress.org/Functions_File_Explained
*
* @package child
*/
if ( ! function_exists( 'child' ) ) :
add_action( 'wp_enqueue_scripts', 'enqueue_styles' );
@michaelbragg
michaelbragg / class-*-activator.php
Created September 14, 2015 12:13
WordPress: Flush rewrite rules on plugin activation
<?php
/**
* `includes/class-*-activator.php
*/
/**
* Add setting to register the plugins activation.
*
* Create an option field in the database to check against later.
*
@michaelbragg
michaelbragg / .gitconfig
Created October 23, 2015 09:23
Global Git Ignore: Add or amend these files in your `~/` folder
[core]
excludesfile = ~/.gitignore