Skip to content

Instantly share code, notes, and snippets.

View lepittenger's full-sized avatar

Lauren Levin (Pittenger) lepittenger

View GitHub Profile
@lepittenger
lepittenger / index.php
Created June 3, 2015 14:42
Check if the_content is empty
<?php
if ( $post->post_content=="" ) {
// do something for posts without content
} else {
// do something for posts with content
};
// OR
@lepittenger
lepittenger / addmenuatts.php
Created April 14, 2015 20:47
Add attributes to WordPress menu items
function add_menu_atts( $atts, $item, $args ) {
$atts['itemprop'] = 'url';
return $atts;
}
add_filter( 'nav_menu_link_attributes', 'add_menu_atts', 10, 3 );
@lepittenger
lepittenger / README.txt
Last active August 29, 2015 14:16
Creating a Button Shortcode
How to use
[button link='http://linktosomething.com' color='orange']My Button Text![/button]
@lepittenger
lepittenger / config.rb
Created November 20, 2014 22:26
Create a source map with Compass
sourcemap = true
@lepittenger
lepittenger / css_resources.md
Last active August 29, 2015 14:10 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@lepittenger
lepittenger / javascript_resources.md
Last active August 29, 2015 14:10 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
body, html {
-webkit-font-smoothing: antialiased;
text-shadow: 1px 1px 1px rgba(0,0,0,0.004);
}
@lepittenger
lepittenger / Preferences.sublime-settings
Created September 17, 2014 16:57
Sublime Text Preferences
{
"auto_complete_delay": 0,
"bold_folder_labels": true,
"color_scheme": "Packages/Color Scheme - Default/Pastels on Dark.tmTheme",
"copy_with_empty_selection": false,
"detect_slow_plugins": false,
"draw_white_space": "all",
"font_face": "Ubuntu Mono",
"font_options": "subpixel_antialias",
"font_size": 14.0,
@lepittenger
lepittenger / gist:3942366
Created October 23, 2012 23:07 — forked from kenmickles/products.php
Array of sample product data
$products = array(
array(
'name' => 'Walrus T-Shirt',
'description' => 'Lorem ipsum adipisicing sint consequat do veniam ea. Lorem ipsum dolore sit eu dolore ut est eiusmod.',
'image' => 'http://www.cottonable.com/wp-content/uploads/2010/01/walrus-cartoon-tee-t-shirt-animal-illustration-apparel-clothing-mustache-fuzzy-ink-men.jpg',
'price' => 12.00,
'sizes' => array(
'Small',
'Medium',
'Large',