Skip to content

Instantly share code, notes, and snippets.


Eric Rasch ericrasch

View GitHub Profile
View content-kitchen-sink.html
This is the primary heading and there should only be one of these per page
A small paragraph to <em>emphasis</em> and show <strong>important</strong> bits.
<li>This is a list item
<li>So is this - there could be more
ericrasch / dabblet.css
Created Mar 13, 2012
HTML Kitchen Sink (taken from BlueTrip CSS Framework) includes the major (and minor) HTML tags you might use on any given site. Now available on
View dabblet.css
* HTML Kitchen Sink
background: #fff;
font: normal normal 14px/1.4 Arial, "Helvetica Neue", Helvetica, sans-serif;
/* background: linear-gradient(45deg, #f06, yellow); */
ericrasch / dabblet.css
Created Mar 15, 2012
Horizontal Type Line Behind Text
View dabblet.css
* Horizontal Type Line Behind Text
* Inspired by this discussion @ CSS-Tricks:
* Available on jsFiddle:
* Available on Dabblet:
* Available on GitHub Gist:
h2 {
font: 33px sans-serif;
ericrasch / include-tweets.php
Created Mar 15, 2012
How to display your latest tweets in your WordPress site without a plugin
View include-tweets.php
// How to display your latest tweets in your WordPress site without a plugin
// Source:
include_once(ABSPATH . WPINC . '/feed.php');
$username = "EricRasch"; // Just insert the username of the Twitter account you want to display
$feed = "$username.rss"; // Changed the code from to actually use the username variable
$num = 2; // Set the number of Tweets you want to display
ericrasch / first-paragraph-class.php
Created Mar 29, 2012
WordPress: Add Class to first Paragraph in WordPress the_content; (add this to the functions.php in your Theme)
View first-paragraph-class.php
/* =BEGIN: Add Class to first Paragraph in WordPress the_content();
---------------------------------------------------------------------------------------------------- */
function first_paragraph($content){
// Testing to see if the content is a Page or Custom Post Type of school, if so, display the text normally (without the class = intro).
if ( is_page() || ('school' == get_post_type() ) ) {
return preg_replace('/<p([^>]+)?>/', '<p$1>', $content, 1);
} else {
return preg_replace('/<p([^>]+)?>/', '<p$1 class="intro">', $content, 1);
ericrasch / dabblet.css
Created Jun 12, 2012
Ordered List Item Style Prefix
View dabblet.css
* Ordered List Item Style Prefix
* prefix ordered list item numbers with a static string using CSS
* Dabblet (by @EricRasch):
* jsFiddle (by @EricRasch):
* SCSS Mixin (by @JimmyNotJim):
* forked from:
* StackOverflow Q&A:
body {
ericrasch / index.html
Created Jun 21, 2012
A web page created at
View index.html
<!DOCTYPE html>
<meta charset="UTF-8">
<title>Responsive Breakpoint Hinting &middot; CodePen</title>
<link rel="stylesheet" href="">
ericrasch / gist:3288425
Created Aug 7, 2012
List WordPress Custom Taxonomy with Posts
View gist:3288425
$taxonomyName = "cpt_rankings_cat"; // Set your custom taxonomy here.
// Alternate method for retrieving a term ID. Source:
$term_list = wp_get_post_terms($post->ID, $taxonomyName, array("fields" => "ids"));
// Source:
$term_parent_ID = $term_list[0]; // Pulls the parent term ID from the call above.
ericrasch / Preferences.sublime-settings
Created Oct 9, 2012 — forked from ericclemmons/Preferences.sublime-settings
SublimeText2 User Preferences (Railscasts)
View Preferences.sublime-settings
"color_scheme": "Packages/Color Scheme - Default/Railscasts.tmTheme",
"theme": "Phoenix Dark.sublime-theme",
"file_exclude_patterns": [
View fn-post-custom-fields-infographic.php
$ig_post_custom_fields = array (
"infographic" => array(
"name" => "is_infographic",
"std" => "",
"title" => "Is this an infographic post?",
"description" => "If you check this box, we'll add a Pin It share option.",
"type" => "checkbox"),
"image_url" => array(