Tag Archive: Code


You need to add this snippet to your CSS stylesheet to have word wrapping work correctly on your images, this saves me a ton of time as now I do not have to double edit my images as I post.  With this change along with the new stuff coming in 2.7 I can finally use WordPresses interface to post!

img.alignleft, div.alignleft {
float:left;
margin:0 0.5em 0.5em 0;
}
img.alignright, div.alignright {
float:right;
margin:0 0 0.5em 0.5em;
}
img.aligncenter, div.aligncenter {
text-align:center;
margin:0 auto;
}

Looks like I keep forgetting to post the code for this so this is how you will do a 301 .htaccess redirect

Redirect 301 /index.html http://www.danieltmurphy.com/welcome-to-my-site/

You must redirect from a specific location to a specific location.  In this case my index.html file is totally blank but it does exist

Create a tgz file backup on linux/unix

tar -cvzpf Backup.11.15.2008.tgz foldername

This makes backup super easy

image I have found this website that lets you plug in the details of the images you want to rotate, the size, and the link you want and then it generates the code for you for a simple plug and play effect on your site.  I have never had the use for something like this until today when I had a request on one of my website’s to change the banner each time the page loads.

HTML Basix – JavaScript Banner Rotator

A little while ago I created a macro that does a paste special, paste plain text.  This comes in very handy when copying and pasting and you don’t want to carry over formatting.  After creating the macro I added a shortcut to it as CTRL-SHIFT-V.  So when I want to paste without formatting this saves me a ton of time.  Below is the code you need to put into the macro.

Sub PlaintextPaste()
Selection.PasteSpecial Link:=False, DataType:=wdPasteText, Placement:= _
wdInLine, DisplayAsIcon:=False
End Sub

Then you need to go to Tools…Customize…click Keyboard button…select Macro from Categories and then select your command from the right and assign the keys

image With the upgrade to WordPress 2.3 they have now added the ability to add Keywords to your posts for web crawling services such as Twitter…Since Live Writer seems to be the best publisher out there there are some things you have to tweak on the blog to get the keywords working.  This is the zip file that you need to unzip into your wp-includes folder and then update your blog accounts on windows live and its all good.

Here is the link to the original post from Digital Inspiration.