Skip to content

Instantly share code, notes, and snippets.

Adam Clark avclark

Block or report user

Report or block avclark

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Rem Mixin
@mixin rem( $property, $a:0, $b:$a, $c:$a, $d:$b ) {
@if ( $property == "font-size" ) {
// $a is the font size
// %b is the keyword
@if ( $a != $b ) {
font-size: $b;
@else {
font-size: $a * $base-font-multiplier * 16px;
avclark / gist:7514123
Created Nov 17, 2013
Vertically center block elements
View gist:7514123
// We use this to vertically center block elements
.vertical-center {
&:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
margin-right: -0.25em; /* Adjusts for spacing */
div {
avclark / gist:7503165
Created Nov 16, 2013
Multi-environment config.php for Wordpress
View gist:7503165
* The base configurations of the WordPress.
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
* This file is used by the wp-config.php creation script during the
avclark / gist:4072742
Created Nov 14, 2012
Simple PHP Contact Script
View gist:4072742
if(isset($_POST['email'])) {
$email_to = "";
$email_subject = "Email Subject line";
function died($error) {
avclark / Create new base project
Created Sep 30, 2012
Bash script to automate new project creation using Alfred, Github and Beanstalk
View Create new base project
# Create Beanstalk Repository
printf "git\n \n" | /Users/avclark/beanstalk repo:create {query}
# Create our new project directory
cd ~/desktop && mkdir {query} && cd {query}
# Clone our HTML-Base repo from Github
git clone
# Cleanup directory
avclark / wp-cpt
Created May 11, 2012
Wordpress Custom Post Type
View wp-cpt
register_post_type('floorplans', array(
'label' => __('Floorplans'),
'singular_label' => __('Floorplans'),
'public' => true,
'show_ui' => true,
'capability_type' => 'post',
'hierarchical' => false,
'rewrite' => true,
'query_var' => false,
'supports' => array('title', 'editor', 'author'),
You can’t perform that action at this time.