Skip to content

Instantly share code, notes, and snippets.

View cdharrison's full-sized avatar
🎯
Focusing

@cdharrison cdharrison

🎯
Focusing
View GitHub Profile
@cdharrison
cdharrison / gist:1563297
Created January 5, 2012 02:01
Add to php.ini to increase max file upload
; Increase maximum post size
post_max_size = 50M
upload_max_filesize = 50M
@cdharrison
cdharrison / html5base.php
Created January 5, 2012 16:04
HTML5 Starter File
<!doctype html>
<html>
<head>
<title>Starter HTML Document</title>
<meta charset="utf-8" />
<style>
/* @import url(reset.css); */
/* START: reset.css */
/* http://meyerweb.com/eric/tools/css/reset/
@cdharrison
cdharrison / pinterest
Created May 15, 2012 14:27
Set Default Pinterest Share Image based on Featured Image
<?php if ( has_post_thumbnail() ) :
$src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 720,405 ), false, '' );
?>
<a href="http://pinterest.com/pin/create/button/?media=<?php echo $src[0]; ?>&url=<?php the_permalink() ?>" class="pin-it-button" count-layout="none"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>
<?php else : ?>
<a href="http://pinterest.com/pin/create/button/?media=http://example.com/example.png&url=<?php the_permalink() ?>" class="pin-it-button" count-layout="none"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>
<?php endif; ?>
@cdharrison
cdharrison / resources
Created August 14, 2012 16:53
Resources
### Web Fonts ###
+ http://fontsquirrel.com
+ http://typekit.com
+ http://google.com/fonts
### Books ###
+ HTML and CSS: Design and Build Websites by Jon Duckett
++ http://www.amazon.com/dp/1118008189/
+ Designing with Web Standards by Jeffrey Zeldman
++ http://www.amazon.com/dp/0321616952/
@cdharrison
cdharrison / bootstrap joomla menus
Created February 21, 2013 20:25
Enable Bootstrap dropdown menus in Joomla
Add before </body>:
<script type="text/javascript">
(function($){
$(document).ready(function(){
$('.dropdown-toggle').dropdown();
// dropdown
$('.parent').addClass('dropdown');
$('.parent > a').addClass('dropdown-toggle');
$('.parent > a').attr('data-toggle', 'dropdown');
@cdharrison
cdharrison / new_gist_file
Created July 30, 2013 13:39
Set WordPress WP_HOME and WP_SITEURL so that it matches wildcard (www or no-www)
define('WP_HOME','http://'. $_SERVER['SERVER_NAME']);
define('WP_SITEURL','http://'. $_SERVER['SERVER_NAME']);
body{
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
}
@cdharrison
cdharrison / _mixins.scss
Created July 30, 2013 20:04
My base mixins
// Mixins
@mixin clearfix-overflow{
overflow: hidden;
_overflow: visible;
zoom: 1;
}
@mixin boxEmboss($opacity, $opacity2){
box-shadow:white($opacity) 0 1px 0, inset black($opacity2) 0 1px 0;
@cdharrison
cdharrison / _buddypress.scss
Created August 3, 2013 03:48
A SCSS version of buddypress.css that comes with bp-default. Converted using http://css2sass.heroku.com/
/*--------------------------------------------------------------
Hello, this is the BuddyPress Legacy stylesheet.
----------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 - Navigation
1.1 - Pagination
2.0 - WordPress
2.1 - Images
@cdharrison
cdharrison / css-scan.js
Created August 3, 2013 04:15
How to get list of all of the CSS classes used in an HTML file. Source: http://stackoverflow.com/a/7540783
var used = [];
var elements = null;
//get all elements
if (typeof document.getElementsByTagName != 'undefined') {
elements = document.getElementsByTagName('*');
}
if (!elements || !elements.length) {
elements = document.all; // ie5