Skip to content

Instantly share code, notes, and snippets.

View zachharkey's full-sized avatar

Zach Harkey zachharkey

  • Harkey Design
  • Deep South
View GitHub Profile
@zachharkey
zachharkey / .bash_logout
Created June 17, 2013 16:47
WebEnabled Default dotfiles
# ~/.bash_logout
clear

Template Components

Used to provide structural templates.

Pattern

t-template-name
t-template-name--modifier-name
t-template-name__subcomponent-name--subcomponent-modifier-name
@zachharkey
zachharkey / .bashrc
Created May 22, 2013 22:02
Cpanel .bashrc to prevent error: "stdin: is not a tty"
# .bashrc
# Prevent "stdin: is not a tty" errors
if [ $(expr index "$-" i) -eq 0 ]; then
return
fi
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
@zachharkey
zachharkey / Sample-Post.html
Last active December 16, 2015 18:39 — forked from idan/gist:3135754
Sample Post (repurposed for generic use cases)
<p>This is a sample post. It is designed to test the presentation of range of standard content elements. To be specific, these are the non-structured, elements that would make up the main content of a generic page, post, or article. This content is CMS agnostic and Markdown-friendly. A properly configured editor should support (and perhaps even be limited to) the set of elements on this page.</p>
<h2 id="this-is-a-major-heading-h2">This is a major heading (h2)</h2>
<p>If you peek at it with a web inspector, you'll see that it is an <code>H2</code>. There should only be one first level heading per page and it should be reserved for the page title itself. In most CMSes this title field is separate from the main content body and its placement is controlled at the template level, ideally with a custom class attribute. Consult the <a href="http://html5doctor.com/outlines/">HTML5 outlining algorithm</a> for best practice.</p>
<p>There's nothing stopping you from using <code>H3</code>, <code>H4</code>, or <code>H5</
@zachharkey
zachharkey / index.html
Created April 12, 2013 19:45
A CodePen by Zach Harkey. SASS demo for tom
<article class="teaser">
<h2 class="page-title">
This is the page title
</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</article>
@zachharkey
zachharkey / _media-object.scss
Last active December 15, 2015 07:29 — forked from Victa/_media-object.scss
A SASS(SCSS) Mixin to easily apply the [OOCSS Media object][stubbornella] to any component. Implements the code from this [Gist][github] which I forked from [Victa][github 2] to provide more SMACSS friendly default class names and reordered the arguments in based on my own frequency of use. [See it in action][codepen] [github]: https://gist.gith…
// OOCSS Media Object
@mixin media-object($img: '.media-img', $bd: '.media-bd', $margin:10px, $position: left, $formatting-context: 'overflow') {
@include pie-clearfix; // or extend a .clearfix class
#{unquote($bd)} {
@if $formatting-context == 'overflow' {
overflow:hidden;
} @else {
display:table-cell;
width:10000px;
*width:auto;
@zachharkey
zachharkey / osx.sh
Created February 23, 2013 22:10
Set OS X defaults to prevent Full Names from copying with email addresses in OS X Mail
# Copy email addresses as `[email protected]` instead of `Foo Bar <[email protected]>` in Mail.app
defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false
@zachharkey
zachharkey / template.php
Created February 20, 2013 07:01
Drupal 7 Using Newer Versions of jQuery on certain pages Method 4: Swapping jquery with preprocess page http://drupal.org/node/1058168
<?php
function MYTHEME_preprocess_page(&$variables) {
// exclude backend pages to avoid core js not working anymore
// you could also just use a backend theme to avoid this
if (arg(0) != 'admin' || !(arg(1) == 'add' && arg(2) == 'edit') || arg(0) != 'panels' || arg(0) != 'ctools') {
$scripts = drupal_add_js();
$new_jquery = array(drupal_get_path('theme', 'YOURTHEME') . '/js/jquery-1.7.1.min.js' => $scripts['core']['misc/jquery.js']);
$scripts['core'] = array_merge($new_jquery, $scripts['core']);
unset($scripts['core']['misc/jquery.js']);
@zachharkey
zachharkey / example.aliases.drushrc.php
Created February 13, 2013 06:04
Example of Drush site alias configuration file
<?php
/**
* Example of valid statements for an alias file. Use this
* file as a guide to creating your own aliases.
*
* Aliases are commonly used to define short names for
* local or remote Drupal installations; however, an alias
* is really nothing more than a collection of options.
* A canonical alias named "dev" that points to a local
@zachharkey
zachharkey / phpinfo.php
Created January 15, 2013 21:35
PHP Info file
<?php
phpinfo();
?>