Write your own twitter mashup using the Twitter API
Thinking about writing your own twitter mashup using php ? But you don’t know how to get started ?
It’s easy , just download the following twitter wrapping class for PHP and have a look at the example code below :
This code will print out the latest replies you have received on twitter
<?
require_once(“lib/phpTwitter/twitter.php”);$t = new twitter(‘YOUR_USERNAME’,'YOUR_PASSWORD’);
echo’<pre>’;
$replies = $t->getReplies() ;
for ($i = 0; $i < $count; $i++) {$reply = $replies[$i][text];
echo $reply;
echo “</br></br></br></br>”;}
// Print out the complete replies array
//print_r( $replies );echo’</pre>’;
?>
Now you know already how to retrieve and print out your replies, then it will be only a matter of walking through Tijs his class to know what else you can do with his wrapper(class)!
Eg :
- updateProfileImage
- updateProfile
- getFriends
- getPublicTimeline
- …
I am sure you will have your script running within this and an hour !
Note : Formatting code in WP seems like a tough job , so you will have to do it yourself
Hattrick – The New Design VS PsicoTSI / Foxtrick
Since the design of hattrick is renewed recently, it is necessary (again) to upgrade to the latest version of psictsi and foxtrick. Since I am not a Certified Hattrick Product provider , I can only provide you with the url where you can find the latest Firefox extensions …
If you should have any questions regarding the installation of these extensions, don’t hesitate to leave a comment ….
Happy Holidays!
How to monitor PostgreSQL processes
pg_top is ‘top’ for PostgreSQL. It is derived from Unix Top. Similar to top, pg_top allows you to monitor PostgreSQL processes. It also allows you to:
- View currently running SQL statement of a process.
- View query plan of a currently running SQL statement.
- View locks held by a process.
- View user table statistics.
- View user index statistics.
You can download it here…
How to install it :
- tar xvzf pg_top-3.6.2.tar.gz
- yum install postgresql-devel
- yum install ncurses-devel
- ./configure
- make
A quick example :
- ./pg_top -U username-d database -h localhost -W
More information :
- ./pg_top –help
An interestesting slideshare :
PsicoTSI Troubles resolved!
As you all may have noticed , PsicoTSI isn’t working anymore due to some changes hattrick made.
I will try to contact the original developer asap and I will keep you posted about the current status of this issue!
To be continued….
Update 06/09/2008 :
Foxtrick is already fixed, download the latest release here
And you can download here a fix for PsicoTSI thnx to psicotsi_user :
I had to delete the extension due to complaints from CHPP
/CHPP-IndianaRed
Update 30/09/2008 :
Looking for a free virtual fileserver solution , try NomaDesk ?
MinimizeToTray for Firefox 3 | Minimize to Tray for Firefox 3
After PsicoTSI for Firefox 3 , I was only missing one extension anymore for Firefox 3 : MinimizeToTray.
Thanks to Dicks I found a download link to MinimizeToTray for Firefox.
How To Backup / Rsync all your data to Bluehost
Last Saturday I ordered a new domain name at bluehost : http://www.wijndaele.com
Why Bluehost (Red marked = The most important for me) :
- UNLIMITED Hosting Space (NEW!)
- UNLIMITED File Transfer (NEW!)
- 2,500 POP/Imap Email Accounts
- SSH (Secure Shell), SSL, FTP, Stats
- CGI, Ruby (RoR), Perl, PHP, MySQL, PostgreSQL
- Free Domain Forever!
- 24/7 Superb Support
And this for (only) 60 €/Yr. (96$/Yr)
Because they offer unlimited hosting space I decided to start backing up al my files from my NAS to “my webspace“.
And since you have ssh access , you can use rsync (or something similar)
First I enabled SSH access on my nas. Then I enabled public-key authentication (How To) on my wijndaele.com account. When that was done I wrote the following script (combination of scripts I found on inet) and I placed it on to my NAS :
# This script does personal backups to a rsync backup server.# directory to backup BDIR=/volume1/photo/# excludes file - this contains a wildcard pattern per line of files to exclude EXCLUDES=/volume1/NetBackup/backup.exclude# the name of the backup machine BSERVER=YOUR_USERNAME@YOUR_IPTODAY=`date '+%Y-%m-%d'`# remote directory where we would like to backup our data to RBDIR=/BACKUP##########################################################################OPTS="--force --ignore-errors --delete-excluded --exclude-from=$EXCLUDES --delete --backup --backup-dir=/$BACKUPDIR -avz"# now the actual transfer rsync $OPTS $BDIR $BSERVER:$RBDIR/currentssh $BSERVER 'touch /BACKUP/current ; cp -al /BACKUP/current/* /BACKUP/`date '+%Y-%m-%d'` ; exit';
As you can see this is a small script that creates for every day a new subdir on your /BACKUP directory. Also at any time you can find the latest backup in the following directory : /BACKUP/current
And If you may wonder about the last step :
ssh $BSERVER 'touch /BACKUP/current ; cp -al /BACKUP/current/* /BACKUP/`date '+%Y-%m-%d'` ; exit';
Here is some more info about it :
- I create a remote ssh connection to wijndaele.com (ssh YOUR_USERNAME@YOUR_IP)
- I touch /BACKUP/current , that way I know when the last sync took place
- cp -al /BACKUP/current/* /BACKUP/`date ‘+%Y-%m-%d’` : I create a hard link from all the files in /BACKUP/current/* to the Dir of that day (eg /BACKUP/2008-08-04)
- When all that is done, I simply close the remote connection!
Download here the backup script : backup.sh
Monitor your website (For Free)
Do you have small website/blog ?
- Probably the answer is YES!
Do you have any clue about the uptime off your site ?
- NO but it’s higher then Twitter his uptime!
One week ago I asked myself the same question (had the same answers) and I decided to do something about it!
So cheap as I am , I decided to look for free monitoring tools :
I decided to go for option one, Mon.itor.us , since you have a lot of extra options/utilities.
If you think I made the wrong choice , feel free to add some suggestions, arguments,…
And If you are willing to pay a small amount, check out Pingdom!
Linux | Rebuild an existing package / rpm
You’ve installed an RPM on a server a while ago and now you are migrating to another server. And you don’t want to re-configure everything?Or you can’t retrieve/find that RPM anymore ?
Then I know a perfect tool for you : RpmRebuild.
What is it :
rpmrebuild is a tool to build an RPM file from a package that has already been installed
in a basic use, rpmrebuild use do not require any rpm building knowledge
(On debian, the equivalent product is dpkg-repack)
How to use this :
#yum install rpmrebuild
#rpmrebuild packagename
I never knew this existed untill one week ago, but know that I know. Damn so handy!
PsicoTSI for Firefox 3
Since I am a huge hattrick fan I use the following Firefox extensions to help me out with making the correct decisions :
But since the upgrade of firefox to version 3.0 PsicoTSI isn’t working anymore so I decided to take a look at it and I made it compatible for firefox 3.0.
So here can you download psicotsi_te_1.0.12.xpi for FF 3.0
Or if you don’t want to registrate yourself … (updated on 06/09/2008)
Again, you are providing an unofficial version of PsicoTSI at http://www.wijndaele.com/wwdj/2008/09/psicotsi-troubles/
Please remove this version promptly or we will be forced to refer you to the GMs, who could lock your team.
Regards
/CHPP-IndianaRed
How can you install this extension :
- Download the xpi file and drag it on to your firefox window
Now you should be able to install and use it!
And if you feel into it, you can always buy me a beer for the effort that I’ve put in it
Looking for a free virtual fileserver solution , try NomaDesk ?
Update : 05/09/2008
More info on the current PsicoTSI Problem can be found here
Getting started with Cakephp without mod_rewrite
You want to know more about CakePHP ? Then I can advice you the following :
Step 1 : Start with a working apache web server.
Here can you registrate yourself for a free account!
When you are reading connect to your account usng an ftp client and upload the latest cakephp framework. (Atm it is 1.2 RC1)
FYI : I used release candidate 1 from 1.2 since I noticed that version 1.2 is better documented than stable release 1,1
Step 2 : Follow the CakePHP Blog Tutorial
It is an easy to follow tutorial. I only had troubles with it because of mod_rewrite so I describe what I’ve done to let it work without mod_rewriten:
- Edit /app/config/core.php and uncomment the line that looks like:
Configure::write(‘App.baseUrl’, env(‘SCRIPT_NAME’)); - remove these .htaccess files
-
/.htaccess
-
/app/.htaccess
-
/app/webroot/.htaccess
-
- Instead of http://www.example.com/index.php/posts/index all your urls will become http://www.example.com/index.php/posts/index
And that should be it! Simple ? Yes if you know how to do it, else you could be searching for hours. And it seemed I was not alone having this problem.
Step 3 : Start over from 0 and develop something else using their excellent manual



