pictures

hints

General hints I think might help others that I have come across over the years. If you have any questions, please feel free to contact me.

Quick CSS for WordPress Images

hr
hr

If you install WordPress and use the media uploader to manage your images in your posts - you can easily style your images quickly by adding the following code to your theme's stylesheet.

CSS:
img.alignright, img.aligncenter, img.alignleft {padding:4px;background:#efefef;border-color: #aaa #ccc #ddd #bbb;border-style: solid;border-width: 1px;}
img.alignright {float:right;margin-left:5px;}
img.alignleft, img.alignnone {float:left;margin-right:5px;}
img.aligncenter {display: block;margin-left: auto;margin-right: auto;}

This code will set up your images to float appropriately, as well as give a nice border as seen below.

Christmas in DC

Something For Ben, Ken, and Doug

hr
hr

We all need them. We all use them. We all realize the power - but with the exception of Ben - we all run into road blocks and frustration when we try and put something together. What are they? Regular Expressions. Take a look at the cool RegEx testing tool where you can easily test your regular expressions.

Find and Replace With phpMyAdmin (or using SQL)

hr
hr

Ever need to find and replace something in your WordPress database? (perhaps you changed domain names and have the old domain name or folder structure hard coded into some of your posts) You can easily update your database by using phpMyAdmin or by using the following code in any SQL interface:

SQL:
UPDATE wp_posts SET post_content = REPLACE(post_content,"http://olddomain.com/blog","newdomain.com/");

The first part of the command says "update the database table wp_posts" (where your content is stored). The later part of the command says "use the field "post_content" (where all your actual post content is stored" and then find "http://olddomain.com/blog" and replace ... [more]

Undelete Something With SVN

hr
hr

Ever delete something with svn (svn del) and then realize you needed it again? You can get it back by using: svn copy -r HEAD filenameyoudeleted.extension filenameyoudeleted.extension

  • svn copy is the command to get a working copy back
  • -r is short for revision. I used HEAD which will give you the latest in repository. You can specify a revision number, revision right before you committed, etc (check out svn help copy)
  • filename is what you deleted, then where it goes. I usually do something like this within the folder the file was located so you do not see any paths, ... [more]

Subversion File Status Reference

hr
hr

Something that confuses a lot of people when they start using subversion is the file status. (svn st) Here is a quick list of the file status codes and what they mean:

  • A File was added
  • C Conflicting changes
  • D File was deleted
  • G File was merged
  • R File was replaced
  • U File was updated
  • ? File is not under version control (you will need to add it)
  • ! File is missing (probably was deleted using the OS or some other application and not subversion)

Career Advice for College Students (or Anyone)

hr
hr

I returned from a trip to my alma mater, The Pennsylvania State University, a few days ago after getting asked to speak at the History Department career fair. I was one of seven speakers at the event. We all had various non-traditional history degree careers (which was the point) and surprisingly we all had a very similar message to give to everyone.

  • Network. We all got to where we were by connections and relationships we had made along the way.
  • Get yourself out there. Most of our first job experiences were not what we wanted to do for the ... [more]

How to Get Stuff Done

hr
hr

The last few weeks I have been extremely busy and on top of that I have been dealing with a sick child and also being sick myself. There is no time to be wasted so efficient use of the time I had was crucial. I feel that since owning my own business, I have had to work very hard to make the most of my time and have a few tips:

  • Focus on 1-3 big tasks per day. Any more tasks than 3 will most likely cause you to spend too much time switching gears. I have begun making ... [more]

Always Use a Doctype

hr
hr

After spending an hour on something that should have taken me 20 minutes - I wanted to pass on something I should have caught right away. The problem: you use CSS to lay something out and it looks great in Firefox and Safari - but not in IE. At this point I validate the CSS to make sure I did not forget a bracket or something stupid. Next step - validate the XHTML. This is where I would have solved my problem, but I failed to take this step. At that point I would have ... [more]

Quick Site Backup (files and database) Via the Command Line

hr
hr

If you do any sort of web development, it is more than likely that CPANEL and phpMyAdmin are good friends of yours...and you depend on them. Even though those are extremely handy to create/modify databases and create backups, it is extremely helpful to know how to do the same thing by using only SSH and command line utilities.

To backup (export) a database using the command line interface (CLI):

CODE:
mysqldump -p --user=username --add-drop-table database> backup.sql

You will then need to provide your database password and the exported data will go into a file called "backup.sql" which is located ... [more]

Add a “Pseudo” Pseudo Class Hover in Inline CSS.

hr
hr

I have been busy this week with a few really cool projects - one of them to create a widget for any site that will show the latest news items from a RSS feed - while not limiting the widget to servers with PHP. After putting that together, I had to add inline CSS to style the feed output. Everything looked great but I could not figure out how to add a :hover to an inline style...until I realized I could fake it by adding some basic javascript: onmouseover and onmouseout to change the font color.

[html]... [more]

check php syntax errors before committing changes.

hr
hr

I learned an important and valuable lesson today. Before committing code to a live server, always run: php - l filename.php to check for syntax errors if you cannot view the file beforehand. Enough said.

quick and easy css layout: yui css grid builder.

hr
hr

If you are not comfortable with CSS or want to get a layout together really quick - check out the YUI CSS Grid Builder. You can easily create a layout, add content, and get the code in a matter of minutes. At the very least - this is a great starting point for beginners! Check it out!

repairing a mysql table

hr
hr

I have run into some database problems over the years, but had to do something different today when I saw that this site had a problematic table (wp_posts). When I looked at the issue first, I got the message "MySQL error code 145 = Table was marked as crashed and should be repaired".

To repair a table, I have run (at a mysql prompt in the command line): REPAIR TABLE wp_posts; but today that did not work. After doing some research, I finally was able to fix the table by using: myisamchk -r wp_posts (see documentation. ... [more]

show network mounts on desktop in Mac OS X 10.5.

hr
hr

After spending more time than I would have liked trying to figure out how to get any network shares/mounts to show up on my Desktop like they did before I upgraded to Leopard, I finally figured it out. It is possible and it is easy to set up. If you want to have your servers to appear as icons on the desktop:

  1. Click anywhere in the Finder
  2. Choose the Finder menu > Preferences
  3. Click on the "General" tab
  4. Check the "Connected servers" option

Show Servers

jappler recommends: babel fish translation.

hr
hr

My company is working on one of the largest projects we have ever done and the entire project (a 153 field application form, admin, scoring admin, etc) has to be done in both English and Spanish. This has been a fun project all around. This is the first time I have worked with Ruby on Rails and with localization. Fortunately enough, I found a great tool which I had never used before: Babel Fish Translation. I can input all my form labels and text into the English to Spanish translator and viola! ... [more]

email overload? here are some tips.

hr
hr

Most people rely on email for their day to day business and personal communication - so much so that your mailboxes are most likely overflowing. Here are a few tips I have practiced over the last few years to keep my email under control.

  1. Make a judgement call with each email message you receive. If it will be beneficial in the future to view, keep it, if not, get rid of it on the spot. You will be amazed at how many message you have like this - and cluttered they make your mailboxes. Toss out the "Thanks", "Got ... [more]

rake smarter.

hr
hr

I have a decent size backyard and after years of raking - I finally figured out how to rake more effectively.

  1. Don't be the first person on the block to start raking. People have a tendency to start raking way too early. If you are the first, other neighbor's leaves are going to just blow into your yard, and most likely you failed to look up and see a lot more leaves on the trees.
  2. Only start raking after there has been a good wind or rain storm. I always wait until after a good wind storm or ... [more]

mac OS X 10.5 (Leopard) smb fix.

hr
hr

I ran into an issue earlier today where I could not connect to a SMB share after my upgrade to Mac OS X 10.5. After some research, I found a thread in Apple's Discussions.

Basically...you need to not use "Connect to Server..." - you need to mount/unmount the SMB share via the command line.

Basic Mount/Unmount Process

  1. Create a directory (folder) where you want the mounted share to appear. I created a folder called "SMB" on my Desktop
  2. Type in the following command: mount_smbfs //useyourusername@localhost/remote_share /Users/useyourusername/Desktop/SMB in the terminal
  3. You will be prompted for your password, type it in
  4. You now have access ... [more]

out of disk space.

hr
hr

If you all the sudden get database errors (select, cannot login, cannot write, etc) - and everything looks ok (from the database end of things) check to make sure you have not run out of disk space. How do I know? Well - let's say last night I had to do a major fall clean-up. If you know me and my monitoring habits, this will sound a bit confusing because one of the many things I monitor is disk space, but when your hosting company accidentally halves your disk space - trouble can occur, and quickly. I have ... [more]

Jappler Recommends: Do Not Use iPowerWeb Hosting

hr
hr

I have a lot of hosting companies - thanks to my clients who come in with all kinds of hosting companies. I have found that some hosting companies are better than others in terms of support and I just found another horrible support company that I wanted to mention: iPowerWeb. I was on hold multiple times today for over 30 minutes and I waited to "Live Chat" with someone for over 20 minutes. When someone actually got on and tried to help, after 1 hour, they told me they could not help me and had to escalate ... [more]


search

subscription information

Blog RSS

Comments RSS



Powered by FeedBlitz

blog categories

blog tags

most popular posts

  1. using parallels and windows for web development debugging.
  2. remove all .svn directories in a directory.
  3. wordpress newsletter plugin.
  4. jappler recommends: room & board (store).
  5. php live training.
  6. another good first tuesday in november.
  7. so long, farewell ben!
  8. feel better soon joe paterno.
  9. css containers: one image, fixed width, rounded corners.
  10. outlook users having issues with mail.app attachments.

blog archive

standards

Get Firefox!
XHTML
CSS