Automated site and database backups using PHP and cron

Using cron jobs to perform maintenance tasks becomes so much more inviting once you realize you don’t have to go out and learn PERL in order to make use of them. Any server with PHP installed can run any arbitrary PHP scripts you throw its way, and with the help of powerful functions like exec() and passthru() just about any administrative maintenance task can be carried out easily, including whole site and database backups. How it works

Tagged with: , ,
Posted in MySQL, PHP, Server Administration, Server Side Code

WordPress caching and wp-cron.php

After battling with terrible response time on three WordPress sites on the same hosting account for three days, I think I’ve finally gotten to the source of the issue: the wp-cron.php file. This file is how WordPress runs scheduled tasks, and is intended to run silently in the background without affecting load times. However, as I found out, this isn’t always the case. How to fix it

Tagged with: , ,
Posted in PHP, Server Administration, Server Side Code, WordPress

Using an Ajax powered web form to update a database

As part of the preparation for my upcoming wedding to a wonderful lady, I’m in charge of building our wedding website, which we’ve decided will handle all of our RSVPs. I’m still in the process of building the RSVP form for that site, maybe I’ll do a full post about it and all its features once it’s done. But this process did give me an idea to build a more universal and flexible web form, which could easily be plugged into any LAMP environment and used to push form responses to a database using Ajax. How I did it

Tagged with: , , ,
Posted in GitHub, HTML & CSS, JavaScript, MySQL, PHP, Server Side Code

SharePoint 2010 custom ribbon actions project

One of the things I’ve found myself building in several different SharePoint projects are customized ribbon actions. The ribbon in SharePoint is a really useful tool, and the fact that it’s completely customizable makes it exceptionally powerful. I’ve put together some of the more universally useful ribbon actions that I’ve worked on into one generic solution which could be a great benefit to anyone looking to provide their SharePoint authors with more functionality. Read more ›

Tagged with: , , ,
Posted in CodePlex, HTML & CSS, JavaScript, jQuery, SharePoint, SharePoint Frontend

Creating custom SharePoint 2010 ribbon actions

If you saw my post on a set of custom ribbon items I created, you’ll know that custom ribbon actions in SharePoint 2010 can be a very powerful tool. In this post I’ll go through the basics of what it takes to connect a custom action to a ribbon button using some handy SharePoint custom JavaScript. Read more ›

Tagged with: ,
Posted in HTML & CSS, JavaScript, SharePoint, SharePoint Frontend

SharePoint 2010 Cascading Lookup Fieldtype

A few months ago at work I was tasked with heading up the development of one of our more complicated sites (research.wustl.edu) while we moved it from SharePoint 2007 to SharePoint 2010. These moves are generally pretty easy, but they can be complicated when the site relies on a lot of customized code that might not work so well in the new environment. As irritating as it can be at times, this particular case gave me the opportunity to create something new, something that I hope can benefit someone else in a similar situation. Read more ›

Tagged with:
Posted in .NET, .NET for SharePoint, CodePlex, Server Side Code, SharePoint

Get query string values from JavaScript

I found this code a while ago, probably somewhere on Stack Overflow, and it’s served me well ever since. It returns a data object filled with the key-value pairs of the query string. Try it!

Tagged with:
Posted in Custom Library Functions, JavaScript, Try It

Rounding prototypes for JavaScript

JavaScript does include some standard methods for rounding numbers, but if you’re working on a project that involves calling them frequently, it can get a little tiring. Especially if you need to round to a certain number of decimal places as opposed to an integer. I haven’t encountered this situation much, but I though it would be a neat exercise for some new Number.prototype methods. Try it!

Tagged with:
Posted in Custom Library Functions, JavaScript, Try It

A better JavaScript random number generator

Every time I needed a random number in JavaScript, I always ended up building some weird, difficult to read manipulation of the Math.random() method to get a value in the range I needed. After doing this a few times on a few different projects, I decided it would be a worthwhile effort to concoct an all-in-one JavaScript random number generator. Try it!

Tagged with:
Posted in Custom Library Functions, JavaScript, Try It