Archive for July, 2007

TwitterPress 0.1 preview version ready to download!

Friday, July 27th, 2007

TwitterPress is a wordpress plugin which mashup Twitter and your Wordpress blog. TwitterPress was inspired by AlexKing’s Twitter Tools.

 This is a 0.1 preview version, I was suposed to implement more features and enable more options inside it, however some plan changed and I suddenly become very busy these days.(Life is random, isn’t it?) So I have to release this preview version out just in case I was sucked in some works so TwitterPress may be delaied too long.

Features:

TwitterPress 0.1 have following features:

  • Display your twitter friends on your blog, like any other Social Network did
  • Display your friends (on twitters)’s latest update, so you and your reader can easily discover some topics inside your friends network
  • Automatically send twitter when you post new blogs, so your friends will get notified and come to read

I plan to add more in the near future:

  • More widgets, so you have more flexibilities to add twitter friends, latest updates on your blog
  • Lightbox style display of twitter friends on the blog
  • Friend of friends browser in Ajax
  • Add twitter friends directly from blog
  • Integrate twitter account with blog comment users
  • and more…

How it look like:

image

This is a screen shot from my Chinese blog, I put TwitterPress in my right side bar. (see the red arrow pointed part)

How to install:

  • Download TwitterPress (current version 0.1 preview)
  • Decompress into your wordpress’s “wp-content/plugins” directory, make sure the “cache’ directory inside ‘TwitterPress’ directory is writable by your web server (simplest way is set to 777 or ‘a+w’)
    • unzip TwitterPress-x.x.zip
    • chmod 777 TwitterPress/cache
  • In your wordpress admin page’s “plugins” tab, activate TwitterPress plugin
  • Then you will have a new Option tab named “TwitterPress”, setup your Twitter account there
  • Navigate to wordpress admin’s “presentation/widgets” tab, and you will find a “Twitter Press” widget ready to use, drag it to your sidebar.

Download

Thanks

Popularity: 71% [?]

YSlow, web site performance tool

Wednesday, July 25th, 2007

Speed up your web pages with YSlow

YSlow analyzes web pages and tells you why they’re slow based on the rules for high performance web sites. YSlow is a Firefox add-on integrated with the popular Firebug web development tool. YSlow gives you:

  • Performance report card
  • HTTP/HTML summary
  • List of components in the page
  • Tools including JSLint


Install Firebug first!

Visit Yahoo! Exceptional Performance on YDN.

Sounds pretty cool, will try it…

Popularity: 11% [?]

TwitterPress is under construction…

Wednesday, July 25th, 2007

image 

I have installed an unfinished TwitterPress in my Chinese blog (in Chinese) for test, because most of my twitter friends speak Chinese…

Hopefully I will finish it in 1 or 2 days and release the first version. :)

Here is a progress from an idea to the real thing…

idea: Twitter+wordpress = SNS enabled wordpress

prototye: A twitter based social network inside wordpress

0.1 (alpha) : this post…

0.1 (beta) : maybe tomorrow…

Popularity: 11% [?]

The best analytics plugin I ever seen: Geotrack Plugin (2.0.2)

Monday, July 23rd, 2007

 

Today I found a great wordpress plugin today:

Features:

  • logs every visit on your wordpress blog in your MySQL database
  • automatic cleanup of logs in your MySQL database
  • contains the same information as Apache combined server logs with ip, referrer, method, status, uri, user agent and access time
  • additionally stores geo-ip information with country, ISO country code, city name, latitude and longitude
  • displays a list of current visitors
  • displays a top-10-list of referrers, visited pages, visitors‘ countries and visitors‘ cities
  • has functionality to prevent referrer spamming
  • ip blocking of known referrer spammers
  • contains a set of free (GNU-GPL / Creative Commons) country flags from Wikipedia
  • Google maps integration: shows your visitors‘ locations on world map
  • fast geoip retrieval through local database
  • contains installer and update scripts
  • uses MaxMind GeoLite City
  • see it in action here
  • and of course it’s free to use!

Very cool, very useful and with google maps displaying who si from where…

See it live in my site:

http://dev.robertmao.com/visitors-map/

Download it here!

Popularity: 24% [?]

Google Maps + Google Ditu Mashup

Sunday, July 22nd, 2007

转到 Google 地图 主页Go to Google Maps Home

Some days ago I wrote a small bookmarklet to switch between Google Maps and Google Ditu, now I have a simple maskup which add google ditu as a customized layer in Google Maps.

The reason why Google Ditu in China can’t contain a satellite layer is the goverment’s policy. There are so many unbelieveable policies here in China, this one is just a simple example.

The satellite images and the maps don’t match well, actually that’s also a policy and requirement by China goverment… :(

 

Here is page with the code,use browser’s “view source” to see how this implemented.

Popularity: 15% [?]

Get google reader’s UID

Sunday, July 22nd, 2007

 

Playing with Google Reader API, in some API it need a UID.

Google Reader users are assigned a 20-digit user ID used throughout Google’s feed system. No cookies or session IDs are required to access this member-specific data. User-specifc data is accessible using the google.com cookie named “SID.”

Open Google reader, in address bar, input following and hit return:

javascript:if (prompt(”Google Reader ID”, _USER_ID)) {};

What you get a 20 digits, that’s google reader’s UID, and can be used in Google Reader API.

Unfortunately, many of the APIs only return a 500 internal error page. :( 

Popularity: 13% [?]

A elegant simple cache class for PHP 5

Sunday, July 22nd, 2007

I am using a simple cache class for PHP5 by phpguru.

Output Cache

The OutputCache class is used for caching the generated output of your scripts, or certain sections of them. It has Start and End methods, and is used like this:

<?php
if (!OutputCache::Start(”myGroup”, “myID”, 600)) {
// Generate some output (as you do)…
OutputCache::End();
    }

?>

Data Cache

The DataCache is used to cache data structures, as opposed to script output. This allows you to cache the creation of large arrays for example, or the results of slow queries. This is helpful if your pages are rather dynamic, though some areas aren’t. Or in a recently experienced situation of mine: You have one central DB server, and multiple front end webservers. A common setup. If the load is getting high on the database, you might want to move some portion of queries (ORDER BY RAND() is a good example) to the webservers instead of the database server. Thus randomisation (eg using shuffle()) happens on one of 5 webservers, instead of your single resource limited database server. Anyway, some code:

<?php
if (!$data = DataCache::Get(”myGroup”, “myOtherID”)) {
$result = $db->query(”SELECT BIG_ASS_QUERY()”);
DataCache::Put(”myGroup”, “myOtherID”, 600, $result);
    }
// Do something useful with $result
?>

Miscellaneous Bits

There’s a few configuration bits and bobs you can twiddle with if you like twiddling. setPrefix() as you can well imagine sets the prefix used in the cache data filenames. This defaults to “cache_”. setStore() sets where the data files themselves are stored. This defaults to “/dev/shm/”, since this is a convenient way to store the data files in shared memory. If you don’t have this, try changing the path to “/tmp/”. Must be given with a trailing slash.

And last, and least (so as not to be a corny ass), there’s the static variable Cache::$enabled.

Popularity: 9% [?]

A twitter based social network inside wordpress

Sunday, July 22nd, 2007

image

I am now working on an experiment: a wordpress plugin to turn wordpress into a social network, you can have friends lists, the latest updates of friends, the lastest posts of friends in your wordpress page.

This social network is based on Twitter, and it was inspired by AlexKing’s TwitterTools.

I will tweak it these days, when it’s ready I will release it so every one can play with it.

The original idea was here: Twitter+wordpress = SNS enabled wordpress

Popularity: 15% [?]

Turn wifi laptop to an access point

Saturday, July 21st, 2007

Found a video tour in CNET to let you turn a laptop to a hot spot. Actually I did this before at least 3 years ago. :)

Basicly, use Windows XP’s connection sharing, and make the wireless network working on ad hoc mode. Other laptop use “ad hoc” mode to join the ad hoc network and share the same Internet connection.  (The computers in a ad-hoc wifi network is just like computers connected to a hub)

From the video tour it seemed that with Windows Vista and Mac OSX, it will be much easier.

Though it worked, believe me, it’s much better to buy a Apple Airport Express, its user expereince is much much better.

Introducing AirPort Express with AirTunes. For Mac + PC.

Popularity: 13% [?]

Clean temp files and make windows boot faster

Saturday, July 21st, 2007

 

Via Cedong

pretty useful batch script.  Copy & paste it in to a file named “clean.bat”, run it to delete all temp files.

@echo off

echo Deleting IE temp files…
del /f /s /q “%userprofile%\Local Settings\Temporary Internet Files\*.*”
del /f /s /q “%userprofile%\Local Settings\Temp\*.*”

echo Deleting *.tmp *._tmp *.log *.chk *.old…
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old

echo Deleting recycle bin, temp dir, etc…
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & md %windir%\temp

echo Clean system disk…
%windir%\system32\sfc.exe /purgecache

echo Defrag system drive…
%windir%\system32\defrag.exe %systemdrive% -b

echo Finished!

echo. & pause

Popularity: 9% [?]

Close
E-mail It
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License.