Category Archives: Development

PHP Security Cheat Sheet

Following on from the Photoshop Cheat Sheet post, I figured I’d make it a series of posting the cheat sheets I use almost daily or at least when I use certain programs. This PHP Security Cheat Sheet by SK89q has been next to my Computer for quite literally years. I almost don’t need it, I know it so well but as a check list its always worth reading over to be sure I missed nothing before releasing an application to the public.

You can see more up to date stuff on OWASP but I like this check list better, the OWASP Cheat Sheet Book (Website) is an amazing thing to have a good read of on a whole manner of geeky subjects.

PHP Security Cheat Sheet

PHP Security Cheat Sheet

You can click the picture or right click it to save a big version of it, hit escape to close the image as its a high resolution image.

A Manchester Based Photographer and Website Developer with interests in Strongman, Fitness and Geekery.

WordPress Stuck in Maintenance Mode

Working on a new project recently with some custom plugins and the likes has caused a few shall we say glitches. A recent upgrade crashed half way through, well the database locked erroneously resulting in the website being stuck in “maintenance mode”.

DANGER, DANGER, RED ALERT!

Maintenance Mode

Maintenance Mode

Don’t panic, this is very very easy to solve…

A file called .maintenance (notice the . at the start) is created automatically by WordPress whenever you update WordPress, Themes or Plugins. This is created to effectively shut WordPress down so it can update cleanly. Once the update is completed successfully the .maintenance file is normally deleted.

There is a small obstacle, its IMPOSSIBLE to delete it via the wordpress admin (wp-admin) area of your website. You will need to access it via your web hosts file manager or via FTP.

HOW TO ACCESS THE FILE MANAGER

File Manager Options

File Manager Options

I use cPanel so the following steps will be done using that, and since its the most popular admin panel, the odds are high you’ll be using that too.

  1. Login to your host cPanel control panel.
  2. Scroll down the page to where it says File Manager and click it.
  3. When the Option Box (right) pops up, be sure select “Web Root” and next tick “Show Hidden Files (dotfiles)”.
  4. Scroll down to find the .maintenance file, it will usually be next to .htaccess, which is often the first file after the folders.
    *Be sure to note the .(DOT) before .maintenance.
  5. Select the file so its highlighted and hit Delete (Big red X).

How simple were that ?

 Alternative Methods via FTP

It can be done via FTP but that often needs a 3rd party application install, and configuring, using your web hosts control panel is something almost all website owners have access too.

A Manchester Based Photographer and Website Developer with interests in Strongman, Fitness and Geekery.

Protein Snacks

Protein Snacks Screen Shot

Protein Snacks Screen Shot

A project I’ve been working on (not finished) which is related to one of my own personal ‘struggle’ and goals. The details aren’t that important but in short. A recent iDXA / DEXA Scan at Derbyshire University revealed I had exactly 86.419kg / 13st 6lbs of lean muscle mass (no bones/fat/etc included). This helped me set my macro-nutrition / diet quite accurately on my quest to get BEEEEEFCAAAKED. Again cut short this means scan means I’m aiming at 45g* protein per 6 hours so as to distribute my intake through the day. It’s hard work finding good sources, with the right nutritional balance (skewed to protein).
*These numbers are based on my own research, activity levels, body composition and conclusions, so do your own research for your numbers, maybe in a future post I’ll go deeper in to it.

Flexible Protein

This brings me neatly to the issue of finding flexible methods of getting the protein in without massively blowing the other macro’s. Overloading carbs is easy as ummm cake, overloading the fat is almost as easy. I buy biltong, jerky, protein bars, RTD shakes, protein gels and all sorts of good snacks when getting a balanced meal isn’t possible. Which with a busy lifestyle is quite common, you know the drill, your hungry, you buy a bag of crisp or chocolate bar or something else, this site is about NOT going that way.

Just for an example…

Lion Bar 43g has 205kcal, 9g fat, 29g carbs, 2g protein, 80mg of sodium.
DynaBar 43g has 180kcal, 6.9g fat, 17g carbs, 14g protein, 50mg sodium.

The Protein Dynamix DynaBar has 1/3 less fat, sugar and sodium, 7 times more protein, this isn’t the best macro split, but given the very close taste, the Dyna is 100% a better option.

So there we have it, how my new project can and will help myself and others in the same boat.

 

A Manchester Based Photographer and Website Developer with interests in Strongman, Fitness and Geekery.