Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Simple AJAX Demo</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
</head>
<body>
<ul class="main-navigation" data-js="navigation">
<?php
if ( ! function_exists('physicians_custom_post_type') ) {
// Register Custom Post Type
function physicians_custom_post_type() {
$labels = array(
'name' => 'Physicians',
'singular_name' => 'Physician',
(function(){
'use strict';
var querySelector = document.querySelector.bind(document);
var clickMe = querySelector('.clickMe');
clickMe.addEventListener('click', callback);
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "centos65"
config.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box"
<?php
/**
* ----------------------------------------
* Adds template name, as class, on the body
* @return Array
* ----------------------------------------
*/
add_filter('body_class', 'the_fresh_class_themer');
function the_fresh_class_themer($classes = '')
{
function Validator(rules) {
"use strict";
this.patterns = {};
this.tests = {};
for (var i = 0; i < rules.length; ++i ) {
this.addRule(rules[i]);
}
};

##Zero Out Hard Drive using Linux##

sudo dd if=/dev/zero of=/dev/hda bs=1M

###Additional Data Recovery###

See: Ubuntu Data Recovery Page

sudo ddrescue --force /dev/zero /dev/sda log.txt

<?php
/**
* Reviews Custom Post Type
*/
function reviews_custom_post_type() {
# Custom Labels
$labels = array(
'name' => 'Reviews',
'singular_name' => 'Review',
'menu_name' => 'Reviews',

##Setting Up Meta Data Fields##

  • Install/Activate Custom Fields Suite WordPress Plug-In, Docs
  • Create new Field Group called Gallery Meta Data
  • Add a Field called Gallery Images and set the type as Loop, fill out the rest of the required fields, for placement rules attach this custom meta data to WordPress type of Page or whatever your requirements are. Hit Publish Figure 1
  • Next, Add additional field called Image. Hit Update Figure 2
  • Next, drag Image, field we just created, under the Gallery Images it needs to be a child of the Loop, Hit Update Figure 3

##Adding Meta Data to Pages##