This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove image width/height, so everything can work responsively in posts | |
function strip_size($html, $id) { | |
$html = preg_replace('/\<(.*?)(width="(.*?)")(.*?)(height="(.*?)")(.*?)\>/i', '<$1$4$7>',$html); | |
return $html; | |
} | |
add_filter('get_image_tag', 'strip_size', 10, 2); | |
function remove_thumbnail_dimensions( $html ) { | |
$html = preg_replace( '/(width|height)=\"\d*\"\s/', "", $html ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run this in terminal to generate a key on your local machine | |
ssh-keygen -t rsa | |
# Next, SSH into your site and and copy the contents of the local file ~/.ssh/mykey.pub to the remote file ~/.ssh/authorized_keys | |
# I use vi for this, and you can have multiple keys in one file | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This hook is used to push a mirrored version of all committed files to your remote repo after they are commited | |
# Replace this variable with your remote repo name | |
REPO=dropbox | |
echo | |
echo "==== Sending changes to $REPO repo ====" | |
echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# search redirect | |
# this will take anything in the query string, minus any extraneous values, and turn them into a clean working url | |
RewriteCond %{QUERY_STRING} \\?s=([^&]+) [NC] | |
RewriteRule ^$ /search/%1/? [NC,R,L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE `mailinglist` ( `id` INT NOT NULL AUTO_INCREMENT , `email` TEXT NOT NULL, `user` TEXT NOT NULL , PRIMARY KEY ( `id` ) ) |
NewerOlder