Skip to content

Instantly share code, notes, and snippets.

View boogah's full-sized avatar
🎡

Jason Cosper boogah

🎡
View GitHub Profile
@boogah
boogah / .htaccess
Created February 16, 2012 04:59
Expire headers .htaccess code.
<IfModule mod_expires.c>
ExpiresActive on
# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault "access plus 1 month"
# Data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
@boogah
boogah / command
Created September 10, 2012 17:53
Get rid of duplicate applications in OS X's "Open With..." menu.
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/\LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local\ -domain system -domain user
@boogah
boogah / reactions.md
Created September 28, 2012 20:52
Reaction Gifs

angry

butthurt

cringe

crying

crying2

@boogah
boogah / wipe_user_activation_key.sql
Created October 16, 2012 19:39
Remove all user_activation_key values in WordPress install
--
-- Note: Make sure `wp_users` matches your user table.
--
update wp_users set user_activation_key='';
@boogah
boogah / apache.log
Created October 16, 2012 20:29
Using same user_activation_key
188.3.108.176 - - [11/Aug/2012:20:30:05 +0000] "GET /wp-login.php?action=rp&key=HR9qFJ2N6c3XveQY487b&login=admin HTTP/1.0" 200 1477 "-" "Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120403211507 Firefox/14.0.1"
188.143.232.184 - - [11/Aug/2012:21:00:07 +0000] "GET /wp-login.php?action=rp&key=HR9qFJ2N6c3XveQY487b&login=admin HTTP/1.0" 200 1477 "-" "Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120403211507 Firefox/14.0.1"
@boogah
boogah / wp-config.php
Last active November 24, 2024 02:36
WordPress Multisite No Blog Redirect
// Point this wherever you'd like, but consider using your install's parent domain.
define( 'NOBLOGREDIRECT', 'http://domain.com' );
@boogah
boogah / find_bad_posts.sql
Created November 12, 2012 19:41
Check DB for malicious post insertions
SELECT * FROM wp_posts WHERE post_content LIKE '%<iframe%'
UNION
SELECT * FROM wp_posts WHERE post_content LIKE '%<noscript%'
UNION
SELECT * FROM wp_posts WHERE post_content LIKE '%display:%';
@boogah
boogah / nginx.conf
Created December 4, 2012 18:43
Temporarily stop a WordPress spam run in nginx.
#location ~* class-phpmailer\.php { return 444; }
@boogah
boogah / changelog.md
Last active April 6, 2021 14:25
DMCA Takedown Template Originally adapted from: http://www.epicorg.com/sample-dmca-take-down-notice.html
@boogah
boogah / euro_unicode_cruft_fix.sql
Last active December 10, 2015 22:58
A fix for European Unicode character weirdness. Other character fixes are available here: https://gist.github.com/1379880
update wp_posts set post_content = replace(post_content,'ä','ä');
update wp_posts set post_title = replace(post_title,'ä','ä');
update wp_comments set comment_content = replace(comment_content,'ä','ä');
update wp_postmeta set meta_value = replace(meta_value,'ä','ä');
update wp_posts set post_excerpt = replace(post_excerpt,'ä','ä');
update wp_terms set name = replace(name,'ä','ä');
update wp_posts set post_content = replace(post_content,'ö','ö');
update wp_posts set post_title = replace(post_title,'ö','ö');
update wp_comments set comment_content = replace(comment_content,'ö','ö');