Archive for August, 2008

Hide Adsense/Ads on Admin in Wordpress

Posted on August 30th, 2008 in Google, Programming | No Comments »

You have wordpress and you put ads on it, like this blog (sorry if you feel its too much, haha), and you want to hide your ads when you and the other admins are viewing the site. Here is a small script that might help you.

Go to the location of your ads, it could be found on your template if you add it manually (if you use plugins your on your own)

For example you add an ads on your sidebar, you can access this page through the admin’s Design Tab -> Theme Editor -> Sidebar (sidebar.php). Enter this code:
<? if(!current_user_can('edit_users')): ?>
Your Ads here
<? endif; ?>

SecondSpin.com

What does this do, it will check if the user can edit users which means it will check if the current user is an admin, another thing to notice here is that i didn’t use curly brackets on PHP’s if, so if you didn’t know yet PHP is quite a messy language, it can have C syntax and some Basic kinda like syntax, usually i use Basic kinda like syntax on view. Why? Coz using the if-endif,for-endfor,foreach-endforeach of it seems to be more readable then curly brackets when combined with html tags.

Microsoft: No more Windows Live Mail crashes with IE8 Beta 2

Posted on August 30th, 2008 in Links | No Comments »

When i read the news i couldn’t help but laugh, man will IE8 be the next zune? Where MS products don’t communcate properly. On the list of items is hotmail, another MS product, this does mean these sites didn’t follow the standard? I don’t know but its really funny and the fact that this is beta 2 not alpha release makes it more funny. You can read the rest of the story here.

http://www.computerworld.com/action/article.do?command=viewArticleBasic&articleId=9113900&intsrc=hm_list

Claytronics - Physical Dynamic Rendering

Posted on August 28th, 2008 in Technology | No Comments »

This stuff is so cool and this could be the future of tech and business.

Demo Robot

Posted on August 27th, 2008 in Technology | No Comments »

This robot is amazing.

Mysql REGEXP on Cakephp

Posted on August 27th, 2008 in Programming | No Comments »

Here is a small tutorial on how to use mysql’s regular expression RegExp on cakephp 1.1 or 1.2.

The regular expression will find the records that start with the value of $letter followed by any number of Alphanumeric, space or quote.

Using Query
$condition = "1=1 AND Artist.name REGEXP
'^[$letter][A-Za-z0-9 \']*’”;
$this->paginate(”Artist”,$condition);

Using Array
$condition = array('Artist.name'=>"REGEXP
^[$letter][A-Za-z0-9 ']*”);
$this->paginate(”Artist”,$condition);

The Black Ghost helicopter at Firebox.com
Using Find Method
1.2 (Tested)
$data = $this->Artist->find("all",array("condition"=>
array('Artist.name REGEXP'=>"^[$letter][A-Za-z0-9 ']*”)));
1.1: Tested before don’t know if it still works
$data = $this->Artist->findAll(array(’Artist.name’=>
“REGEXP ^[$letter][A-Za-z0-9 ']*”));

Hope this helps :)

Yahoo and their cool sites

Posted on August 25th, 2008 in Technology | No Comments »

Just when people think that yahoo is the thing of the past, then came their cool sites, some are build within and some are brought by acquisition. Here are some of their cool sites.

Delicious - A Social Bookmarking site, no need for further introduction. An interesting note here is that this site is a search site in disguise, i usually search cool stuff here since the search feature here is a lot better than digg.And btw I got to admin i love the new interface more then the old one, and unlike other programmer i don’t care what language they use as long as the service is good.

Flickr - Online photo management and sharing application, certainly one of the best photo sharing sites out there. I’m just glad they killed yahoo photos for this site.

Yahoo Answers - Ask a question and people will answer you. This site is incredible for finding answer to some of your question, and like delicious this is a search site in disguise.


Yahoo Buzz
- Digg like site. This site is fast becoming the number 1 digg like site (I like reddit the most).

Yahoo Live - Live video streaming, something like ustream or justin.tv. I think this site will have a strong presence on the video space but not as big as youtube, the interface is a lot better than other video streaming site.

Yahoo Shine - This is sometimes have some good article about something that you may not know. What i dont like about it is that they have 2 search box at the top.

Yahoo Upcoming - Event management site, this site is cool coz you can invite everyone on an event, so if your throwing a party and you want to invite everyone then this is a good site to consider.

VerticalResponse, Inc. for small business


Yahoo Pipes
- A powerful composition tool to aggregate, manipulate, and mashup content from around the web. This site help ease of mashing out sites.

Omg - Daily celebrity gossip, good interface.

Fire Eagle - Twitter like site. I don’t know the use of the site, i just think its cool because of its interface. haha

Here are some that use to be cool for me.
Yahoo Groups - Nothing changed since 1998? haha. Full of nonsense groups.

Geocities - Everything is the same??? as when i first use it back in 2000, well except the colors from blue to purple?

Other yahoo sites can be found at
http://everything.yahoo.com/

Javascript JIT makes javascript very fast

Posted on August 24th, 2008 in Programming | No Comments »

For years, many of us have been salivating over the idea of JIT’ed JavaScript in the browser. Adobe’s JIT’ing Flash VM showed a preview of tremendous speed gains to be had, but we’ve had to wait until SquirrelFish from WebKit to see anything dramatic happen in the browser.

More on http://ajaxian.com/archives/javascript-jit-the-dream-gets-closer-in-firefox