It's random, too damn random.


Snap569 Has Arrived Blog

February
28
2009
Posted by Shaibani | Tags: ,

Just wanted to say that Snap569 Coding has moved to http://random-is.me/code. :-)

Cairo, Here I Come! Randomness

February
18
2009
Posted by Shaibani | Tags:

Tomorrow I’m off to Cairo, until the 23rd. Until then, see ya later! :-)

A Small Rant About Valentine’s Day Freedom of Speech

February
14
2009

Ahe ahem.. This is simply to express my hate towards this day. If you don’t wanna read it and enjoy the false day known as Valentine’s Day, and be arrogant then go ahead. If you’re cool, continue reading.

Valentine’s Day sucks! It’s full of bullshit. It’s too cheesy and pink. (Don’t worry, it gets better); but if you really love those around you, wouldn’t you show them how much you appreciate them and love them everyday? An occasion is a time marked by a certain event. NOT a day where you decide to love people and act all kind and make them feel special, and then the next day everything’s back to normal.

That’s the small rant, sorry if I killed your Valentine’s Day spirit.

PS: Don’t kill me — it’s called ‘Freedom of Speech’. Oh, and feel free to spread this. :)

Loading Timer Code

February
14
2009
Posted by Shaibani | Tags: , ,

I’ve got a few people asking about how I got the seconds it took the page to load to display. Just wanna share the code:

1
<?php timer_stop(1); ?>  <?php echo $db->num_queries; ?>

Or you can simply use:

1
<?php echo('text before time' . timer_stop(0) . 'text after time'); ?>

HTML is allowed in text before time and text after time.

Works in a WordPress environment only. :-)

A Few SEO Tips List

February
14
2009
Posted by Shaibani | Tags: , , ,

Search Engine Optimization (SEO), is well self-explanatory. I shouldn’t have to explain what it is, but I will! SEO is simply moving up in the search engine rankings. Hopefully search engines will like you more after you make use of this post. On with my tips:

  1. Use Headers Correctly

    By headers I mean <h1>, <h2>, <h3>, <h4> and so on. What you should have is 1 <h1> tag, 10-15 <h2>, and as many as headers your sidebar needs for <h3>. Confused? I’ll explain. <h1> tags should have the website’s/webpage’s title (eg. Random-is.me). <h2> tags should have the description (if any) (eg. It’s random, too damn random) and the post titles. <h3> tags should be used for sidebar titles.

  2. Meta Tags

    Make sure you have a description, keywords, author etc. If you don’t have them, Google meta generator.

  3. Search Engines Don’t Have Eyes

    Sadly they don’t. So use alt="image of something" for images and title="image of something" for images, links, titles, headers etc.

  4. Validate.

    No I’m not kidding, search engines prefer it. :-D

Got your own tips to share? Go ahead. ;)

wp_logout_url Code

February
13
2009
Posted by Shaibani | Tags: ,

Well as you may have seen, I’ve been changing themes quite frequently in the last few days. I decided to go back to Resurrection (my theme), and as I was looking through the comments code, I found this:

1
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Log out &raquo;</a></p>

What’s wrong with that you ask? If you’re on WordPress 2.7 (you better be), you’re gonna have a problem. In WordPress 2.7, you’ll notice there’s a wpnonce=x (x being random figures and letters) added to the logout URL. How do I get that when there’s a random figure there? Simple:

1
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(); ?>" title="Log out of this account">Log out &raquo;</a></p>

See the difference? It’s the echo wp_logout_url();. That function gives you the whole URL with the wpnounce. :-)

WordPress 2.7.1 WordPress

February
12
2009
Posted by Shaibani | Tags:

Just upgraded – WordPress 2.7.1!

Quote Fail Creation

February
10
2009
Posted by Shaibani | Tags: , , ,

Yet another fail picture…

funny pictures

7 Cool Things to Do With Linux | davehayes.org Asides

February
9
2009
Posted by Shaibani |

Branded Biros Humiliate Borrowers | Gadget Lab from Wired.com Asides

February
8
2009
Posted by Shaibani |
Get Adobe Flash playerPlugin by wpburn.com wordpress themes