Skip to content

Instantly share code, notes, and snippets.

View fleeting's full-sized avatar
🐢
As productive as this turtle.

James Fleeting fleeting

🐢
As productive as this turtle.
View GitHub Profile
<?php
//The following code was submitted by Tycho Lyben for inclusion in WP-TwitterSearch. Has not been tested yet.
$path = CACHE_PATH."/".md5("'phrase'=>$phrase,'from'=>$from,'rpp'=>$rpp,'lang'=>$lang,'nots'=>$nots");
if (file_exists($path) && filectime($path)>time()-1800) { // cache for 30 min
$x = unserialize(file_get_contents($path));
echo $x;
exit;
}
<?php
# WP SUPER CACHE 0.8.9.1
function wpcache_broken_message() {
if ( false == strpos( $_SERVER[ 'REQUEST_URI' ], 'wp-admin' ) )
echo "<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->";
}
if ( !include_once( '/var/www/wp-content/plugins/wp-super-cache/' . 'wp-cache-phase1.php' ) ) {
if ( !@is_file( '/var/www/wp-content/plugins/wp-super-cache/' . 'wp-cache-phase1.php' ) )
register_shutdown_function( 'wpcache_broken_message' );
#experienceLightbox ul {
margin: 15px 0 1em 2em;
padding: 0;
font-size: 1.4em;
color: #666;
display: block;
}
#experienceLightbox ul li {
line-height: 1.8em;
$user_api_key = "agsr63Q9NlwKxUsHQSFFolD2gDWTfk7eN1Il0dhbXQH5FLHVy2VEKvvmnJsdNxYs";
$forum_api_key = NULL;
$api_url = 'http://disqus.com/api/';
$api_version = '1.1';
//http://disqus.com/api/get_forum_list?user_api_key=API_KEY_HERE&api_version=1.1
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api_url . 'get_forum_posts/?user_api_key='.$user_api_key.'&forum_id=242057&api_version='.$api_version);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
<?php
class admin_disqus extends adminController
{
public $user_api_key = "agsr63Q9NlwKxUsHQSFFolD2gDWTfk7eN1Il0dhbXQH5FLHVy2VEKvvmnJsdNxYs";
public $forum_api_key = null;
public $api_url = "http://disqus.com/api/";
public $api_version = "1.1";
//http://disqus.com/api/get_forum_list?user_api_key=API_KEY_HERE&api_version=1.1
function admin_disqus()
$(".workLight").colorbox({width:"940px", inline:true, href:"#workLightbox", onComplete: function(){
var section = $(".workLight").attr("rel");
$("#workLightbox-col1").accordion("activate", parseFloat(section));
changeSelected(section+"_0");
setItem(section, 0, 0);
}
});
$("#whatwedo").click(function() {
if ( $('#whatwedoLI').width() == 98 ) {
$("#whatwedoLI").animate({
width: '310px'
}, 3000);
$("#whatwedo").addClass('active');
} else {
$("#whatwedoLI").animate({
width: '100px'
}, 3000);
$('#nav a').hover(
function() {
$(this).stop.animate({
borderRightWidth: "15px",
paddingRight: "6px"
}, 800, function() {
// Animation complete.
});
},
function () {
$("h2").each(function() {
var text = $(this).html();
$(this).html(text.replace(/^([A-Za-z0-9])/g,'<span>$1</span>'));
});
Cufon.replace('h2 span');
$('#employmentForm').submit(function(){
error = 0;
$('.formErrors').empty();
$('.requiredField').each(function() {
if ($(this).attr("type") == "text") {
if ($(this).val() == '') {
fieldName = $(this).attr("name").split('|');
$('.formErrors').append('<li><strong>'+$(this).parent().attr("name")+'</strong>: '+fieldName[2].slice(0,-1)+' is required.</li>');
error++;