Archive for March, 2009

Classic Old-World Greek Souvlaki (Shish-Kebabs)

Saturday, March 28th, 2009

The 25th video is up on Thursday for Dinner:

Souvlaki has become the quintessential Greek dish. You may prepare souvlaki with pork tenderloin, chicken breast, lamb, as well as pork shoulder. It is wonderful in a pita, or served with a side of rice, Greek salad, and tzatziki sauce. If you are planning to serve this dish, be sure to marinate the meat at least 24 hours before you start the barbecue.


Want to watch this video in HD? Click here to watch it!

For the written recipe click here. Subscribe by Email & iTunes.

How to Make Classic Greek Tzatziki Sauce – video (#24)

Saturday, March 21st, 2009

The 24th video is up on Thursday for Dinner:

Tzatziki is a popular Greek sauce that is often used as a dip with pita bread or enjoyed with various types of meat dishes such as souvlaki and gyros. It is best made with yogurt, but if you prefer not to use yogurt you may substitute it for sour cream.


Want to watch this video in HD? Click here to watch it!

For the written recipe click here. Subscribe by Email & iTunes.

Setting Up Memcached on Ubuntu/Debian and Windows XAMPP

Monday, March 9th, 2009

I have a big problem with writing things down. This inevitably leads me to spending excessive amount of time looking all over the internet for how to solve a problem. Most recently I was trying to remember the steps to get Memcached going on my Debian server and on my laptop.

Luckily I came across this comment on php.net, which explains nicely how to get this going on Debian/Linux. The only thing I needed to do was make sure g++ was installed (i.e. apt-get install g++). Here are the steps:

Code:
-------------------------
# Prerequisite Install
-------------------------
# Download & install libevent (memcached dependency)
wget http://www.monkey.org/~provos/libevent-1.4.8-stable.tar.gz
tar xfz libevent-1.4.8-stable.tar.gz
cd libevent-1.4.8-stable
./configure && make && sudo make install

# Create a symlink to libevent
sudo ln -s /usr/local/lib/libevent-1.4.so.2 /usr/lib

# Download & install memcached
wget http://danga.com/memcached/dist/memcached-1.2.6.tar.gz
tar xfz memcached-1.2.6.tar.gz
cd memcached-1.2.6
./configure && make && sudo make install

# Run memcached as a daemon (d = daemon, m = memory, u = user, l = IP to listen to, p = port)
memcached -d -m 1024 -u root -l 127.0.0.1 -p 11211

-------------------------
# PHP5-Memcache Install
-------------------------
# Download the extension module
apt-get install php5-memcache

# Edit /etc/php5/conf.d/memcache.ini and uncomment the following line by removing the semi-colon
extension=memcache.so

# Restart apache
/etc/init.d/apache2 restart

-------------------------
# Test Install
-------------------------
# Create a file 'memcache_test.php' in your webroot and paste the following:
<?php
$memcache = new Memcache;
$memcache->connect('localhost', 11211) or die ("Could not connect");

$version = $memcache->getVersion();
echo "Server's version: ".$version."<br/>\n";

$tmp_object = new stdClass;
$tmp_object->str_attr = 'test';
$tmp_object->int_attr = 123;

$memcache->set('key', $tmp_object, false, 10) or die ("Failed to save data at the server");
echo "Store data in the cache (data will expire in 10 seconds)<br/>\n";

$get_result = $memcache->get('key');
echo "Data from the cache:<br/>\n";

var_dump($get_result);
?>

In Windows (assuming you have XAMPP installed) go into your php.ini (check phpinfo for location) file and un-comment the following:

Code:
...
extension=php_memcache.dll
...
[Memcache]
memcache.allow_failover = 1
memcache.max_failover_attempts=20
memcache.chunk_size =8192
memcache.default_port = 11211
...

Then head to Jellycan Code and download the Windows memcached port (binary). At this point you should be able to launch the .exe and run the sample code above.

Your Ad Here