From the bottom up
   You have to start some where

show what color a hex color code is

October 23rd, 2008

This is a simple tool that takes a hex color code (#FFFFFF) or color name (white) and uses javascript to display what that color is on the page. Built to quickly debug a style sheet, since #80b5d0 might as well be french.

Some Good Tips

October 15th, 2008

Today i found some good tips

OWASP - PHP Top 5 Security Vulnerabilities

September 24th, 2008

http://www.owasp.org/index.php/PHP_Top_5

That site has tips on security vulnerabilities, here is a quick list of pointers from that article.

  • Remote Code Execution
    • Don’t Use user input in Include, Require or Eval
  • Cross-site scripting
    • Don’t use register_globals
    • If outputting User Submitted Values, sanitize first using htmlentities
    • Avoid $_REQUEST use $_GET or $_POST
    • Validate Values ie use is_numeric or check string length
    • use urlencode when adding variables to a query string
  • SQL Injection
    • Validate Data prior to use in SQL Statements - ie is_numeric
    • When possible use PDO or another Database Abstraction Layer combined with prepared statements at the very least use escape strings ( Avoid addslashes() as it isn’t adequate )
  •  File system attacks
    • Ensure that all variables are properly initialized prior to first use
    • Ensure that the users can only affect file operations to the degree you had in mind
    • Try to move secrets and logs out of the web root if at all possible – see the references on “Shared Hosting” by Chris Shiflett

A Bushel of Javascript Goodness

September 12th, 2008

Here is a link for a Smashing Magazine Post with 75 Different Javascript Tips/Techniques

http://www.smashingmagazine.com/2008/09/11/75-really-useful-javascript-techniques/

Here are ones that i found might be handy at a later date:

 

MySQL Search Tip

April 4th, 2008

So I haven’t written anything in ages, and wanted to put up something to say that i am still kicking. Today i had one of those duh moments, when you stumble upon a feature you never new about. This one is a real duh since its so obvious.

So I was moving a site with dynamic content to a new url, and was searching the DB for any direct links to the old url, so i was building custom Sql queries using MATCH AGAINST and LIKE, to find the search string in th Db tables fields. Well as i was about to use PhpMyAdmin to execute my query i realised there was a search tab, and low and behold it does what i want with out needing to write my own query, DUH.

Thats Al, till i feel like writing again :)

SEO Friendly Javascript Pop Ups

January 30th, 2008

<a href="http://www.google.com" onclick="window.open(this.href, 'popup', 'width=600,height=375'); return false;" target="_blank">Test Link</a>

Moved and Upgraded

November 1st, 2007

So i finally got round to moving the site, files/DB to the new server and upgraded wordpress to the latest version. Let see if i can start writing stuff again.

Alternative to $HTTP_RAW_POST_DATA

March 28th, 2007

If you need to access the Raw Data From the Post Stream, you can do it using the following command;

$raw_post_data = file_put_contents(“php://input”);

The Illusionist, A-

January 9th, 2007

Good Movie, nuff said. edward norton does a great job, and Jessica Biel is always good on the eyes.

Awesome Quote I Found

December 22nd, 2006

Seriously. In my world, HTML is something that graphic designers do, and when they get done with it, I attack their prettiness with my Geek fu and make it walk, talk, and infect your computer with awesomeness.