Skip to content

Instantly share code, notes, and snippets.

View mojaray2k's full-sized avatar

Amen Moja Ra mojaray2k

  • Miami, Fl
View GitHub Profile
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Single-Column Responsive Email Template</title>
<style>
@media only screen and (min-device-width: 541px) {
.content {

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@mojaray2k
mojaray2k / dabblet.css
Last active August 29, 2015 14:07 — forked from basher/dabblet.css
/**
* CSS3 tabbed interface
* - based on http://www.sitepoint.com/css3-tabs-using-target-selector/
* - 1st tab is LAST in markup:
* - so it can be styled as active on page load
* - use combination of :target and ~ to override when another tab is clicked
*/
body {
font: 62.5%/1.5 Georgia,serif;
margin: 10em 0 0;
.your-element {
// Default mobile-first styles here
@include respond(9) {
// Styles for screens from 900px on up
}
@include respond(11, ie) {
// Styles for screens from 1100px on up AND IE8
add_filter('gform_pre_render', 'swp_populate_attendee_list');
function swp_populate_attendee_list($form){
$num = swp_get_the_amount();
if ( count( $num ) < 1 ) {
add_filter('gform_get_form_filter', create_function('', "return 'You have not met the condition! Please go to <a href=\"/?page_id=1\">this form.</a>';") );
}
return $form;

ali.md/pcwp

Step One: Create the custom post type

The following code goes into the functions.php file:

// Create A Somple Product Catalog width Wordpress. ali.md/pcwp
// Step One: Create the custom post type
@mojaray2k
mojaray2k / simple-admin-page.php
Last active August 29, 2015 14:26 — forked from stephenh1988/simple-admin-page.php
A simple class based on a tutorial at WP.Tuts that creates an page with metaboxes.
<?php
/*
Description: A simple class based on a tutorial at WP.Tuts that creates an page with metaboxes.
Author: Stephen Harris
Author URI: http://www.stephenharris.info
*/
/* Copyright 2011 Stephen Harris (contact@stephenharris.info)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@mojaray2k
mojaray2k / gist:f776be6c5d68df210094
Last active August 29, 2015 14:26 — forked from isGabe/gist:3072378
Load jQuery fron Google CDN with local fallback - WordPress style
<?php
/*
**** Load jQuery from Google CDN if available, local fallback if not ****
** Place in your theme's functions.php or relevant file. Edit local jQuery path if needed.
** Works as-is with WordPress Bones Theme v1.2 https://github.com/eddiemachado/bones (replace wp_enqueue_script( 'jquery' ); on line 142
** reference: http://wp.tutsplus.com/tutorials/load-jquery-from-google-cdn-with-local-fallback-for-wordpress/
*/
@mojaray2k
mojaray2k / add-wordpress-settings-page.php
Last active August 29, 2015 14:27 — forked from DavidWells/add-wordpress-settings-page.php
WordPress :: Add Settings Page with All Fields
<?php
/*
Plugin Name: Homepage Settings for BigBang
Plugin URI: http://www.inboundnow.com/
Description: Adds additional functionality to the big bang theme.
Author: David Wells
Author URI: http://www.inboundnow.com
*/
// Specify Hooks/Filters

Susy Tutorial

For this tutorial I'm assuming you are already comfortable with CSS, Sass (I'll use the SCSS syntax) and Compass. Please get set up with each one of those before attempting to use Susy. Sass and Compass both have their own setup instructions and tutorials that you can use.

There is also reference documentation in the works.

What Susy Does

CSS Systems