Tag Archives: Programming

Project: Loukoulos.com

About two months ago we started a new project with the name “Loukoulos.com“.
The website is all about useful recipes, cooking tips and ideas.

Have a look at the website

Become a fan on our Facebook page: http://www.facebook.com/loukoulos.com
Follow us on twitter: @loukoulos_com ( https://twitter.com/loukoulos_com )

See some screenshots from the website as a slide-show in Flickr.com or subscribe to the set “Loukoulos.com”.

Your comments please…

WordPress permalinks with Greek/Russian/Arabic characters

Server Settings
OS: Linux
HTTP Server: Apache2
Database: MySQL (utf-8)
Scripting Language: php 5
Software: wordpress 3.0.4 – wp-confing.php

define('DB_CHARSET', 'utf8');

Create an .htaccess file in your root directory ( e.g www.example.com/ )

vi .htaccess #(you may have to sudo or su)

Add the following lines in the file .htaccess file…

# Disable Directory Browsing
Options All -Indexes

# Secure access to .htaccess files
<Files .htaccess>
order allow,deny
deny from all

Save the file and exit vi (:wq).
You may have to give full access rights to .htaccess!?

chmod 777 .htaccess #(you may have to sudo or su)

Open your favorite browser, go to your www.example.com/wp-admin section then choose

Settings -> Permalinks

and apply your custom structure…

( e.g /%year%/%monthnum%/%postname%/ )

Save Changes

Remove the full access rights from .htaccess!

chmod 644 .htaccess #(you may have to sudo or su)

You are done! Enjoy your wordpress custom permalinks in your preffered language.

I have test it with greek, russian and arabic and worked as a charm!
See an example…

FizzBuzz questions & coding for fun!

Two days ago I was reading in RethinkDB‘s blog the “Will the real programmers please stand up?” which took me to the blogpost of Coding Horror “Why Can’t Programmers.. Program?”.

After reading these two articles I had the idea to start a FizzBuzz coding section just for fun (CfFCoding for Fun).
So today’s FizzBuzz question is…

Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.

Below is my solution written in php.

echo '<h2>Coding For Fun</h2>';
$three = 3;
$five = 5;
$fifteen =15;

for ($i=1; $i<=100; $i++){
	if (($i%$three === 0) && ($i%$five === 0)) {
		echo 'FizzBuzz<br />';
	} elseif ($i%$three === 0) {
		echo 'Fizz<br />';
	} elseif ($i%$five === 0) {
		echo 'Buzz<br />';
	} else {
		echo $i . '<br />';

echo '<br />==============<br /><br />';

for ($i=1; $i<=100; $i++){
	if ($i%$fifteen === 0) {
		echo 'FizzBuzz<br />';
	} elseif ($i%$three === 0) {
		echo 'Fizz<br />';
	} elseif ($i%$five === 0) {
		echo 'Buzz<br />';
	} else {
		echo $i . '<br />';

Yes… it took me 10 minutes 🙁
Can i stand up?!