Skip to content

Instantly share code, notes, and snippets.

@oranblackwell
oranblackwell / ImagePlaceHolderService.md
Created June 10, 2014 08:12
Image Placholder Service

Placeholder It

http://www.placehold.it/150x190

<img src="//placehold.it/150x190" class="img-responsive">

Add Text:

http://www.placehold.it/350x123&text=this+is+text
@oranblackwell
oranblackwell / functions.php.md
Last active August 29, 2015 14:02
Wordpress Responsive Images

Selectively Serve Images

Please note the naming convention for each pair.

<?php
/**
 * Set up custom image sizes
 *
 * @author Oran Blackwell
@oranblackwell
oranblackwell / functions.php.md
Last active August 29, 2015 14:02
Returns responsive checkerboard pattern for use with Bootstrap 3

Creates a checkerboard pattern automatically from within a loop.

<?php 
/**
 * Return alternating rows and columns
 * - on a 2x4 grid : 01-10-01-10
 * - on a 1X8 grid : 0-1-0-1-0-1-0-1
@oranblackwell
oranblackwell / bootstrap-3-clearfix.md
Last active January 17, 2018 10:27
Auto clearfix for Bootstrap 3's cols. (From within a loop)

Auto-insert Bootstrap 3's clearfix for differnt viewport sizes.

<?php 
/**
 * Bootstrap auto clearfix from inside loops.
 * Put this function at the start of the loop before other bootstrap cols are called.
 *
 * @param       int   $i The count from within the loop where the function is called. Starting with 0.
 * @param       array $args ['xs'=> 12, 'sm' => 6, 'md' => 4, 'lg' => 3]
@oranblackwell
oranblackwell / styles.css.md
Created June 17, 2014 15:17
Bootstrap 3 Re-usable helper classes
/* Bootstrap 3 Re-usable helper classes
 * Author: Oran Blackwell
============================================================================= */
div[class*="col-"].no-padding { padding : 0; }
div[class*="col-"].no-padding-left { padding-left : 0; }
div[class*="col-"].no-padding-right { padding-right : 0; }

.no-vertical-margin { margin-bottom : 0; margin-top : 0; }
.negative-margin-left { margin-left : -15px; padding-left : 15px; }
@oranblackwell
oranblackwell / 010 deploymend-quick-start.md
Last active January 13, 2021 01:51
Bedrock Quick Start Guide
To Open HTML Preview window in Notepad++ Ctrl + Shft + H

Wordpress Source Control and Deployment

Revision-Controlled Worpdress with "One Click" Deplyoment using Git, Composer, Capistrano

[Build Status]

Author: Oran Blackwell

Revised: May 06, 2014

@oranblackwell
oranblackwell / deployment-detailed.md
Last active November 15, 2015 16:49
Revision-Controlled Worpdress with "One Click" Deplyoment using Bedrock, Git, Composer, Capistrano

Wordpress Source Control and Deployment

Revision-Controlled Worpdress with "One Click" Deplyoment using Git, Composer, Capistrano

Author: Oran Blackwell

Revised: May 06, 2014

This is a Work In Progress - All feedback is always welcome.

I am attempting to document everything in this document so don't be put off if it seems overly complex. Once the initial setup is done, there is minimal interaction required to deploy. I've tried to include how to handle errors etc.

@oranblackwell
oranblackwell / HTML5-Shiv-and-Respond-JS.md
Last active August 29, 2015 14:02
Add HTML5 Shiv and Respond .js to end of wp_head()

Wordpress - Add HTML5 shiv, Respond.js for IE8

<?php 
/**
 * Add HTML5 shiv, Respond.js for IE8
 */
add_action( 'wp_head', 'ie_support_header', 99 );
function ie_support_header() {
	echo '
@oranblackwell
oranblackwell / example.md
Last active August 29, 2015 14:02
Simple Git Deployment using Tags

Simple Git Deployment using Tags

Example 1

Local

[ ~/Web/Sites/Example]$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
@oranblackwell
oranblackwell / ie-curl.sh
Created June 26, 2014 08:43
Curl All IE Virtual Boxes from Microsoft's Modern.ie
#IE6 - XP
curl -O -L "http://www.modern.ie/vmdownload?platform=mac&virtPlatform=virtualbox&browserOS=IE6-WinXP&parts=0&filename=VMBuild_20131127/VirtualBox/ls/Mac/IE6.WinXP.For.MacVirtualBox.sfx"
#IE8 – XP
curl -O -L "http://www.modern.ie/vmdownload?platform=mac&virtPlatform=virtualbox&browserOS=IE8-WinXP&parts=2&filename=VMBuild_20131127/VirtualBox/IE8_WinXP/Mac/IE8.WinXP.For.MacVirtualBox.part{1.sfx,2.rar}"
#IE7 – Vista
curl -O -L "http://www.modern.ie/vmdownload?platform=mac&virtPlatform=virtualbox&browserOS=IE7-Vista&parts=4&filename=VMBuild_20131127/VirtualBox/IE7_Vista/Mac/IE7.Vista.For.MacVirtualBox.part{1.sfx,2.rar,3.rar,4.rar}"
#IE8 – Win7