Kind of continue from the other gist how to install LAMP on an Amazon AMI
##Install git
sudo yum install git-core
##Create ssh directory since it doesn't exists by default on the Amazon AMI
<?php | |
/* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
function xmas() { | |
var b = document.getElementsByTagName('body')[0]; | |
var c = document.createElement('canvas'); | |
var ctx = c.getContext('2d'); | |
var flakes, flakeNumber = 250, gravity = 1, w, h, timer; | |
c.style.cursor = 'pointer'; | |
c.style.zIndex = '999999'; | |
c.style.top = 0; | |
c.style.left = 0; |
<?php | |
/** | |
* Example for writing a WP plugin that adds a custom post type and flushes | |
* rewrite rules only once on initialization. | |
*/ | |
/** | |
* On activation, we'll set an option called 'my_plugin_name_flush' to true, | |
* so our plugin knows, on initialization, to flush the rewrite rules. | |
*/ |
Kind of continue from the other gist how to install LAMP on an Amazon AMI
##Install git
sudo yum install git-core
##Create ssh directory since it doesn't exists by default on the Amazon AMI
<?php | |
/** | |
* for code completion | |
* | |
* @link http://docs.php.net/manual/en/book.gearman.php | |
*/ | |
if (false) { | |
define('GEARMAN_SUCCESS', 0); |
CREATE TABLE IF NOT EXISTS `country` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`iso` char(2) NOT NULL, | |
`name` varchar(80) NOT NULL, | |
`nicename` varchar(80) NOT NULL, | |
`iso3` char(3) DEFAULT NULL, | |
`numcode` smallint(6) DEFAULT NULL, | |
`phonecode` int(5) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
<?php | |
/* | |
Plugin Name: Rewrite Rule Tutorials | |
*/ | |
add_action( 'init', 'pmg_rewrite_add_rewrites' ); | |
function pmg_rewrite_add_rewrites() | |
{ | |
add_rewrite_endpoint( 'json', EP_PERMALINK ); | |
add_rewrite_rule( |
This gist assumes:
<?php | |
/* | |
Here's a couple of metaboxes that I've recently created using this system | |
*/ | |
$subpostings = redrokk_metabox_class::getInstance('subpostings', array( | |
'title' => '(optional) Subscription for Postings', | |
'description' => "As an optional feature, you have a complete api at your disposal which will allow you the ability to offer and manage member posts. In addition to these settings, you may need to create the associated pages for accepting posts from your frontend.", |
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.github.io | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
*/ |