Skip to content

Instantly share code, notes, and snippets.

@Coopeh
Coopeh / sickbeard-clean-library.rb
Last active April 4, 2016 17:47 — forked from Sutto/sickbeard-clean-library.rb
Moved a folder? Clean your sickbeard library... Updated to work with imdb_id instead of tvdb_id
require 'rubygems'
require 'sequel'
database = Sequel.connect('sqlite://sickbeard.db')
database[:tv_episodes].select(:location, :episode_id).exclude(:location => "").each do |show|
if !File.file?(show[:location])
database[:tv_episodes].filter(:episode_id => show[:episode_id]).delete
end
end
@Coopeh
Coopeh / _tw_intercept_comment.php
Created June 20, 2012 09:28 — forked from timwhitlock/_tw_intercept_comment.php
Boot any comment bot that fills in the author website field
<?php
/**
* Boot any comment bot that fills in the author website field.
*/
function _tw_intercept_comment( array $data ){
if( empty($data['comment_author_url']) ){
return $data;
}
get_header();
echo 'See ya';
@Coopeh
Coopeh / disable-plugins-when-doing-local-dev.php
Created May 22, 2012 16:23 — forked from johnpbloch/disable-plugins-when-doing-local-dev.php
Disables specified WordPress plugins when doing local development
<?php
/*
Plugin Name: Disable plugins when doing local dev
Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify
Version: 0.1
License: GPL version 2 or any later version
Author: Mark Jaquith
Author URI: http://coveredwebservices.com/
*/
@Coopeh
Coopeh / README.md
Created April 22, 2012 21:48
Set options for all WordPress Multisite blogs