Friday, July 6, 2012

How to Exclude Directories from Tar

How to Exclude Directories from Tar

# tar -cf Filename.tar --exclude "/full/path/to/exclude/" /path/to/tar

tar -cf Filename.tar --exclude "/full/path/to/exclude1/" --exclude "/full/path/to/exclude2/" /path/to/tar

Friday, June 8, 2012

Harga Sebenar Minyak ron95 && ron97

Minyak

Terima kasih BN. sudah terang sekarang. 

Kami rakyat malaysia meminta agar kerajaan BN mensubsidikan ron97
supaya rakyat dpt menikmati minyak yg berkualiti dan melupuskan trus minyak ron 95.

Apa kata Tok Jib...

Posted via email from Posterous

Wednesday, June 6, 2012

Wordpress user follow users

Just a plugin concept …

  1. Add a form with a button to each user profile, post or wherever you want it named Follow orUnfollow. Show the button only if is_user_logged_in(). You may use a widget for the form.

  2. On form submit update a user meta named follows for the user who clicked the button and another one named followers for … well … the user who just got a new follower. Use the user IDs as a serialized array (yes, ugly, I know).

  3. Create a dashboard widget or a whole page where the access is restricted to users who can follow or be followed. Query for the user meta follows to get a list of all authors the current user has subscribed to and then query for the posts from these users.

  4. Get the user meta followers and print a nice list of her followers.

Thursday, May 24, 2012

Adding postgres user and grant to a database

Adding postgres user and grant to a database

template1=# CREATE USER tom WITH PASSWORD 'myPassword';
template1=# CREATE DATABASE jerry;
template1=# GRANT ALL PRIVILEGES ON DATABASE jerry to tom;

Monday, May 7, 2012

Maintaining PHP session when using CURL.

Maintaining PHP session when using CURL.

 Put session_write_close() before you make the CURL request.

$strCookie = 'PHPSESSID=' . $_COOKIE['PHPSESSID'] . '; path=/';
 
session_write_close();
 
$ch = curl_init($rssFeedLink);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt( $ch, CURLOPT_COOKIE, $strCookie );
$response = curl_exec($ch);
curl_close($ch);

Posted via email from Posterous

Sunday, April 22, 2012

Proxmox installation display out of range

Reference:  https://forum.proxmox.com/threads/proxmox-ve-screen-out-of-range.131297/