Skip to content

Instantly share code, notes, and snippets.

View mojaray2k's full-sized avatar

Amen Moja Ra mojaray2k

  • Miami, Fl
View GitHub Profile
@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 / 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

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
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;
.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
@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;

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

Pure CSS Tic-tac-toe

I have seen demos of pure CSS Tic-tac-toe games, but I was unable to find a version that truly works. If I have missed it, please send me link, so I can see how another dev has created it.

A Pen by Žiga Miklič on CodePen.

License.

<!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 {