Skip to content

Instantly share code, notes, and snippets.

View howardpanton's full-sized avatar

Howard Panton howardpanton

View GitHub Profile
@howardpanton
howardpanton / Fix Cygwin Issue with RubyGem
Created October 8, 2015 13:19 — forked from devcfgc/Fix Cygwin Issue with RubyGem
No such file or directory — /cygdrive/c/Ruby/bin/gem (LoadError)
//We must add the following to your .bashrc (C:\cygwin\home\user\.bashrc):
alias ruby='/cygdrive/c/Ruby21-x64/bin/ruby'
alias gem='/cygdrive/c/Ruby21-x64/bin/gem.bat'
alias irb='/cygdrive/c/Ruby21-x64/bin/irb.bat'
alias compass='/cygdrive/c/Ruby21-x64/bin/compass.bat'
alias sass='/cygdrive/c/Ruby21-x64/bin/sass.bat'
alias scss='/cygdrive/c/Ruby21-x64/bin/scss.bat'
@howardpanton
howardpanton / README.md
Created December 1, 2012 21:03 — forked from necolas/README.md
Experimenting with component-based HTML/CSS naming and patterns

Template Components

Used to provide structural templates.

Pattern

t-template-name
t-template-name--modifier-name
t-template-name__subcomponent-name--subcomponent-modifier-name
@howardpanton
howardpanton / browser hacks
Created January 9, 2013 14:31
Browser hacks
/***** Selector Hacks ******/
/* IE6 and below */
* html #uno { color: red }
/* IE7 */
*:first-child+html #dos { color: red }
/* IE7, FF, Saf, Opera */
@howardpanton
howardpanton / breadcrumb
Created January 11, 2013 12:35
PHP breadcrumbs
function breadcrumbs($separator = ' » ', $home = 'Home') {
$path = array_filter(explode('/', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)));
$base = ($_SERVER['HTTPS'] ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/';
$breadcrumbs = Array("<a href=\"$base\">$home</a>");
foreach ($path AS $x => $crumb) {
$title = ucwords(str_replace(Array('.php', '_', '-'), Array('', ' ', ' '), $crumb));
$breadcrumbs[] = "<a href=\"$base$crumb\">$title</a>";
$base = $base.$crumb.'/';
}
return implode($separator, $breadcrumbs);
.clearfix:before,
.clearfix:after {
content: " ";
display: table;
}
.clearfix:after {
clear: both;
}
@howardpanton
howardpanton / grid-blocks-two.html
Last active December 17, 2015 03:49
Grid Blocks Two Up - HTML
div class="row">
<ul class="blocks d-all">
<li>
<div class="media-block region d1-d6 heading-top">
<h2 class="media-heading-top">
Media Heading
</h2>
<a href="#" title="Link title">
<figure>
<img src="http://placehold.it/423x304" alt="Image Alt">
@howardpanton
howardpanton / grid-blocks-four.html
Last active December 17, 2015 03:49
Grid Block Four Up - HTML
<ul class="blocks four-up">
<li>
<div class="media-block region heading-bottom">
<figure>
<a href="#" title="Link title">
<img src="http://placehold.it/210x210" alt="Image Alt">
</a>
</figure>
<div class="media-body">
<h4 class="media-heading-bottom">Course tutor: Valerie Mace</h4>
@howardpanton
howardpanton / grid-blocks-three.html
Created May 9, 2013 10:14
Grid Block Three Up - HTML
<div class="row">
<ul class="blocks d-all">
<li>
<div class="media-block region three-up heading-top">
<h2 class="media-heading-top">
Media Heading
</h2>
<a href="#" title="Link title">
<figure>
<img src="http://placehold.it/403x304" alt="Image Alt">
<section class="panel light-gray-bg">
<div class="content-wrapper">
<div class="row">
<ul class="blocks">
<li>
<div class="media-block region d1-d4 heading-top">
<h2 class="media-heading-top">
Media Heading
</h2>
<a href="#" title="Link title">
@howardpanton
howardpanton / text-container.html
Last active December 17, 2015 13:09
Basic Text Container
<article class="d1-d8 region">
<header>
<h2>Basic Container H2</h2>
</header><!-- /header -->
<p>
Standard Body Text: From a young age I had always thought that I would study fashion. After my Foundation course I started a fashion womenswear course at another university, but after a few weeks felt that it was not for me. Span 4-8 columns.
</p>
</article>