Skip to content

Instantly share code, notes, and snippets.

View thisislawatts's full-sized avatar

Luke Watts thisislawatts

View GitHub Profile
<form action="#">
<fieldset>
<legend>Legend</legend>
<div>
<label for="text">Text Input <abbr title="Required">*</abbr></label>
<input id="text" class="text" type="text">
<em>Note about this field</em>
</div>
<div>
<label for="password">Password</label>
@thisislawatts
thisislawatts / actions.php
Last active August 29, 2015 13:56
WordPress Tidy Up
remove_action( 'wp_head', 'feed_links', 2 );
remove_action( 'wp_head', 'feed_links_extra', 3 );
remove_action( 'wp_head', 'rsd_link', 10 );
remove_action( 'wp_head', 'wlwmanifest_link', 10 );
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10 );
remove_action( 'wp_head', 'locale_stylesheet', 10 );
remove_action( 'wp_head', 'wp_generator', 10 );
remove_action( 'wp_head', 'rel_canonical', 10 );
@thisislawatts
thisislawatts / gist:8f7892a363911ca0b16a
Created May 8, 2014 08:29
Resrc.js w/ Event emitter
/*!
* EventEmitter v4.2.7 - git.io/ee
* Oliver Caldwell
* MIT license
* @preserve
*/
(function(){"use strict";function t(){}function r(t,n){for(var e=t.length;e--;)if(t[e].listener===n)return e;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var e=t.prototype,i=this,s=i.EventEmitter;e.getListeners=function(n){var r,e,t=this._getEvents();if(n instanceof RegExp){r={};for(e in t)t.hasOwnProperty(e)&&n.test(e)&&(r[e]=t[e])}else r=t[n]||(t[n]=[]);return r},e.flattenListeners=function(t){var e,n=[];for(e=0;e<t.length;e+=1)n.push(t[e].listener);return n},e.getListenersAsObject=function(n){var e,t=this.getListeners(n);return t instanceof Array&&(e={},e[n]=t),e||t},e.addListener=function(i,e){var t,n=this.getListenersAsObject(i),s="object"==typeof e;for(t in n)n.hasOwnProperty(t)&&-1===r(n[t],e)&&n[t].push(s?e:{listener:e,once:!1});return this},e.on=n("addListener"),e.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},e.once=n("addOnceListener"),e.defineE
@thisislawatts
thisislawatts / .htaccess
Created May 22, 2014 11:11
DCD .htaccess
Options +FollowSymLinks
Options +SymLinksIfOwnerMatch
Options +Indexes
RewriteEngine On
RewriteRule ^student/(.*)$ index1.php?page=student&subpage=$2 [L,QSA]
# If the requested file doesn't exist as directory or file
# pass to app(index1.php) to handle the routing
RewriteCond %{REQUEST_FILENAME} !-d
/////////////////////
//
// Atomic Styles
//
// Useful for little interventions
//
/////////////////////
.fl {float: left}
.fr {
@thisislawatts
thisislawatts / hotswap
Last active August 29, 2015 14:02
Tiny Bookmarklet for swapping between sites
(function(w) {
var HotSwap = function () {
this.version = 2;
this.storageKey = 'LAHotSwapTarget_' + this.version;
}
HotSwap.prototype.init = function() {
var dest = window.localStorage.getItem( this.storageKey );
min = function( a, b ) {
return a > b ? b : a;
};
max = function( a, b) {
return a > b ? a : b;
};
coverDimensions = function ( child_w, child_h, container_w, container_h ) {
<style type="text/css">
/*---BODY and MAIN---*/
body{
background-image: url("");
background-repeat: no-repeat;
background-position: center top;
background-attachment: scroll;
}
var gulp = require('gulp');
var sass = require('gulp-sass');
var cssmin = require('gulp-cssmin');
gulp.task('sass', function() {
gulp.src('./assets/scss/*.scss')
.pipe(sass({
includePaths: require('node-bourbon').includePaths,
logErrorToConsole: true
}))
@thisislawatts
thisislawatts / eg.html
Created August 5, 2014 13:36
HTML Markup Example
<section>
<h1 id="main">Styleguide</h1>
<p>The purpose of this HTML is to help determine what default settings are 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>h1. Heading</h1>