Skip to content

Instantly share code, notes, and snippets.

[{
"id": "2.30063746",
"date": "",
"date_gmt": "",
"guid": [],
"modified": "",
"modified_gmt": "",
"slug": "",
"type": "attachment",
"link": "http:\/\/pa-images-static.imgix.net\/v2\/image\/preview\/d85355165f86fd88b4fb85d5f9dbf5a0Y29udGVudCwxNDg2OTAxNjkw\/2.30063746.jpg",
var configLocal = {
undefeatedUrl: 'http://vip.local/espn',
fteUrl: 'http://vip.local/fivethirtyeight',
grantlandUrl: 'http://vip.local/grantland'
}
casper.test.begin( 'Login to wordpress', 3, function suite( test ) {
var jsErrors = [];
casper.on( "page.error", function ( msg, trace ) {
this.echo( "Error: " + msg, "ERROR" );
this.echo( "file: " + trace[0].file, "WARNING" );
function bugs_update_content_split_terms( $old_term_id, $new_term_id, $term_taxonomy_id, $taxonomy ) {
$term_meta = get_option( 'taxonomy_' . $old_term_id );
if ( 'espn_bug' === $taxonomy && $term_meta ) {
// We have a match, so we swap out the old tag ID for the new one and resave the option.
update_option( 'taxonomy_' . $new_term_id, $term_meta );
}
}
add_action( 'split_shared_term', 'bugs_update_content_split_terms', 10, 4 );
ALTER TABLE wp_ai1ec_events MODIFY COLUMN `start` INT(10) UNSIGNED NOT NULL;
ALTER TABLE wp_ai1ec_events MODIFY COLUMN `end` INT(10) UNSIGNED;
ALTER TABLE wp_ai1ec_event_instances MODIFY COLUMN `end` INT(10) UNSIGNED NOT NULL;
ALTER TABLE wp_ai1ec_event_instances MODIFY COLUMN `start` INT(10) UNSIGNED NOT NULL;
UPDATE wp_ai1ec_event_instances, wp_ai1ec_event_instances_restore
SET wp_ai1ec_event_instances.`end` = UNIX_TIMESTAMP(wp_ai1ec_event_instances_restore.`end`)
WHERE wp_ai1ec_event_instances.id = wp_ai1ec_event_instances_restore.id
@nicoladj77
nicoladj77 / Restore events
Created July 29, 2013 18:53
Recover start from Restore
UPDATE wp_ai1ec_events, wp_ai1ec_events_restore
SET wp_ai1ec_events.`start` = UNIX_TIMESTAMP(wp_ai1ec_events_restore.`start`)
WHERE wp_ai1ec_events.post_id = wp_ai1ec_events_restore.post_id
@nicoladj77
nicoladj77 / Front end modal not showing corretcly
Last active December 18, 2015 07:49
gist for modal not showing up correctly
jQuery('#ai1ec-create-event-modal').parents().each(function(){
var $this = jQuery(this);
var position = $this.css('position');
if( position === 'relative' ) {
console.log(this);
$this.css('position', 'static');
}
});
function shutdown() {
$error = error_get_last();
echo '<pre>';
var_dump($error);
echo '</pre>';
}
register_shutdown_function('shutdown');
@nicoladj77
nicoladj77 / apc.php
Created March 12, 2013 12:26 — forked from jbutkus/apc.php
<?php
/*
+----------------------------------------------------------------------+
| APC |
+----------------------------------------------------------------------+
| Copyright (c) 2006-2011 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |