Skip to content

Instantly share code, notes, and snippets.

View anointed's full-sized avatar

shawn gaffney anointed

View GitHub Profile
@anointed
anointed / ocp.php
Created August 7, 2013 12:46 — forked from ck-on/ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.6
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs
@anointed
anointed / ocp.php
Created August 7, 2013 11:11 — forked from ck-on/ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.6
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs
@anointed
anointed / default.conf
Created July 23, 2013 23:38
pagespeed errors on start, this is default.conf file I am using
server {
## Your website name goes here.
server_name mysite.com www.mysite.com;
## Your only path reference.
root /var/www/;
listen 8080;
## This should be in your http block and if it is, it's not needed here.
index index.php index.html index.htm ;
include conf.d/drop;
@anointed
anointed / embed.php
Created July 6, 2013 22:55
video embed code example
<script type="text/javascript" src="http://wphotline.com/evs/player/YXZhZGEtc2hvcnRjb2Rlcy5tcDQ=/?container=evp-Y0Y5PVX9R1"></script><div id="evp-Y0Y5PVX9R1" data-role="evp-video" data-evp-id="YXZhZGEtc2hvcnRjb2Rlcy5tcDQ="></div>
@anointed
anointed / class-easyvideosuite-thumbnails.php
Created May 24, 2013 20:13
evs class for video thumbnails
<?php
/* Copyright 2013 Marc Fowler (email : [email protected])
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@anointed
anointed / evs-thumb-api.php
Created April 30, 2013 11:00
Our EVS Thumbnail API works over GET or POST it really doesn't matter There is actually a way of pulling all 10 thumbnails per video and also the splash image for each video via a url, one in standard form, and one in pretty.
if(get_field('evs_oembed_video_url')) {
$evs_location = get_option('evs_location');
$api = $evs_location.'/api.php';
$the_evs_page_url = get_field('evs_oembed_video_url');
$video_thumb_info = wp_remote_post($api, array(
'method' => 'POST',
'timeout' => 45,
'redirection' => 5,
@anointed
anointed / header.php
Created April 29, 2013 12:08
All of the following is added to the head of a WordPress website when activating the hybrid-connect plugin. http://hybrid-connect.com This is going to become a famous example of what not to do in the WordPress world, and will definitely be the topic of my next WordCamp talk. Seriously guys, this is no joke, all I did was activate the plugin, add…
<div id="fb-root"></div>
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
<script type="text/javascript">
var matched,browser,oldInit=jQuery.fn.init,oldParseJSON=jQuery.parseJSON,rquickExpr=/^(?:[^<]*(<[\w\W]+>)[^>]*|#([\w\-]*))$/;jQuery.fn.init=function(n,t,i){var r;return n&&typeof n=="string"&&!jQuery.isPlainObject(t)&&(r=rquickExpr.exec(n))&&r[1]&&(n.charAt(0)!=="<"&&migrateWarn("$(html) HTML strings must start with '<' character"),t&&t.context&&(t=t.context),jQuery.parseHTML)?oldInit.call(this,jQuery.parseHTML(jQuery.trim(n),t,!0),t,i):oldInit.apply(this,arguments)},jQuery.fn.init.prototype=jQuery.fn,jQuery.parseJSON=function(n){return!n&&n!==null?(migrateWarn("jQuery.parseJSON requires a valid JSON string"),null):oldParseJSON.apply(this,arguments)},jQuery.uaMatch=function(n){n=n.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(n)||/(webkit)[ \/]([\w.]+)/.exec(n)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(n)||/(msie) ([\w.]+)/.exec(n)||n.indexOf("compatible")<0&&/(m
@anointed
anointed / description.txt
Last active March 1, 2016 17:48
jquery countdown timer that replaces a slider with a live video player upon countdown completion.
This is a livecountdown timer jquery script. The concept is simple.
1. I have a slider on my homepage that when the counter is counting down shows the slider
2. when the countdown timer hits zero, then the slider div is hidden and the video div is displayed in it's place.
The primary jquery file livecountdown.js basically does 2 things:
1. the countdown timer itself is wrapped in a div ".live_countdown" When the timer is counting down then the ".live_countdown" is displayed, when the countdown timer hits zero, then the ".live_countdown" is faded out to display none
*That basically takes care of displaying the timer and removing the timer when it hits zero.
**alternately instead of hiding the timer, I can just as easily replace the timer with a 'now playing' graphic or something like that
2. The slider carousel is wrapped in a div ".stepcarousel" This slider is displayed while the countdown timer is greater than zero or still counting down
@anointed
anointed / multi-ipn.php
Created September 30, 2012 02:42
Paypal multiple IPN's
<?php
/*
* This is a PayPal IPN (Instant Payment Notification) broadcaster
* Since PayPal does not provide any straightforward way to add
* multiple IPN listeners we'll have to create a central IPN
* listener that will broadcast (or filter and dispatch) Instant
* Payment Notifications to different destinations (IPN listeners)
*
* http://codeseekah.com/2012/02/11/how-to-setup-multiple-ipn-receivers-in-paypal/
*
@anointed
anointed / page-activity.php
Created September 28, 2012 09:02
buddypress page comments in activity
<?php
function tumble_addpagecomments() {
return array( 'page', 'post' );
}
add_filter( 'bp_blogs_record_comment_post_types', 'tumble_addpagecomments' );