I have compiled some useful features of three desktop environments into one desktop environment. The global menu which is effectively applied in the MacOS, the idea of left dock of Ubuntu, the lightweight-ness of XFCE, and the productive-ness of Xmonad, one of the tiling window managers. I made a script that automatically turns Ubuntu based Xfce desktop to my configuration. I recommend trying this on a Linux Lite installation. Alternatively, you could try installing it on an Ubuntu box with Xfce installed, or on Xubuntu. Feedbacks are all welcome about other distributions. Xmonad is configured using xmonad.hs in ~/.xmonad. According to the configuration, the mod key is set as Win/Cmd key. The keyboard shortcuts are as follows:

ShortcutTask
Shift + Mod + c Close the active window
Shift + Mod + s Take xfce4-screenshot
Shift + Mod + x Reverse tiling windows according to x-axis
Shift + Mod + y Reverse tiling windows according to y-axis
Shift + Mod + h Increase the width of left pane
Shift + Mod + l Increase the width of right pane
Mod + Up Increase the height of windows in the right pane
Mod + Down Decrease the width of windows in the right pane
Mod + Space Switch to another tiling setup
Mod + Tab Switch to next window in the workspace
Mod + z Switch to the previous workspace
Mod + (1|2|3|4|5|6|7|8|9) Switch to the workspace indicated by the number
Shift + Mod + (1|2|3|4|5|6|7|8|9) Move the active window to the workspace indicated by the number


The ordering of the tiling setups are as follows:
  1. Master window on left, others on right
  2. Master window on top, others at bottom
  3. Only master window in full screen with left and top panels
  4. Only master window in full screen (useful for watching full screen video)
If there are multiple windows in a workspace, the active window will have a red border. The script will install the packages below using apt:
xmonad, xfce4-dockbarx-plugin, gnome-terminal, zeitgeist, python-xdg, vala-panel-appmenu, appmenu-gtk3-module, appmenu-gtk2-module, appmenu-qt, gnome-terminal, xmonad, shutter, xfce4-appmenu-plugin, xfce4-systemload-plugin, arc-theme

Please note that, the script will install google-chrome amd64 binary. If you have other hardware, you should modify the related line. The script will install Arc Dark theme and switch to it.

After running the script, you will have a desktop environment that looks like the following screenshots:

You can preview media easily utilizing the tiling window manager:


You can prepare your own IDE like environment. For example, the picture shows preview of a pdf paper at the right side, and tex file editor at the left. At the bottom of the left side, a command line is present to compile the tex file into pdf. The pdf viewer at the right side immediately previews if a new compilation occurs.


The following pictures show Chrome in full screen. The first picture demonstrates the top global menu. The second picture demonstrates the left dock.



I have just uploaded a single file to github which computes cosine similarity of two files. Cosine similarity is a widely used similarity measure of two texts. This simple code computes cosine similarity of two text files given as parameters. To use this, php-cli (PHP command line interpreter) must be working. The output is written to the STDOUT. I have made the cosine similarity code work in PHP. I have not implemented all of the code. The code is developed using the ideas and piece of codes in various web sites. I used this code in identification of topics of a microblog post set which was introduced in this post. Usage: php computeCosine.php file1 file2

The most common function used in Ethereum application development is the Keccak256 hashing. Keccak256 is used for Ethereum message signing, obtaining the wallet address given a public key, determining smart contract address and determining the function selector of smart contract to be provided as data in transactions given a function prototype (like in ABI encoding). I have looked around and could not find a useful implementation for this. They are either unfinished like this one or too complicated to use like this one, or this one.
All I need is a simple keccak256() function that returns keccak-256 of a hex encoded string. So I decided to do it for myself. I looked around a bit and found a clear C program in this page. All I need is to make this code work in PHP. Luckily PHP has a mechanism to extent its functionality. I followed the guide here. Then I obtained a working keccak256 function.
In this github page, I published the codes to be used by anyone interested.
Before installation, PHP developer files must be installed. To install keccak256() functionality:
  • git clone https://github.com/RnDevelover/Keccak256PHP.git
  • cd Keccak256PHP
  • phpize
  • ./configure --enable-keccak256
  • make
  • copy modules/keccak256.so to your php extension directory.
  • enable extension by adding extension=keccak256.so to your php.ini
Usage:
$a="cc"; // Hex encoded string. All characters are [0-9a-fA-F].
$hash=keccak256($a);
echo $hash; // Hex encoded hash.

This function returns a string of hex encoded 256 bit data (64 characters where each two character indicates one byte).
Our previous study extracts human readable topics given a set of microblog posts. Based on the idea of identifying the topics of a crowd of microblog users, we have recently came up with semantically representing microblog topics for machine consumption. Source code of the prototype is published. To install topic identification approach in a linux machine follow the following steps.
  • Install R
  • Make sure that Rscript is running
  • Install php-cli (Php command line interface) version>5
  • Make sure that php-curl is installed
  • Make sure that shell_exec is working in PHP-cli
  • Obtain a TagMe API key
  • Download the SBounTI package and extract it in an empty directory
  • Edit cfg/config.php according to need (such as base urls of resources that will be produced and the TagMe API key)
  • Obtain a microblog post dataset about 5 thousand posts, either
    • in a file format of short texts in each line
    • or in a raw file retrieved from Twitter streaming API
  • Issue command:
    • ./sbounti <filename> "<dataset_name>" "<start_date>" "<end_date>"
      for the text file
    • ./sbounti <filename> "<dataset_name>"
      for the raw Twitter streaming API file
    Where <filename> is the file name of the file that has short messages, <dataset_name> that is used in the explanations of the resources expressed in OWL, <start_date> and <end_date> are valid start and end date-times of the post set in the format as in example: Wed Sep 21 11:01:56 +0300 2016.
  • The produced OWL file contents are written to STDOUT. So, you may want to redirect the output to a file using "> filename.owl" at the end of the command.
  • If you have questions please contact Ahmet Yildirim
I have got to know Kömür(COAL)  Port years ago during my first diving experiences... Do not let the name fool you, it is actually a tiny fisherman's bay. To reach this tiny fisherman's bay, you have to cross a steep mountainous terrain.

A charming, unspoiled fishing port nestled at the foot of lush hills right on the Saroz Gulf in the Aegean Sea, Kömür is visited by only a few scuba divers, campers and fishers.
It takes around 30-40 minutes from the intersection of the main road to the road to Fındıklı village.
Reaching Kömür presents good views for campers and two very pretty beaches.

While you are looking the top of the mountain on the valley, you realize that structuring is very limited in here,  only a few fisherman shelters. An important feature of this paradise is that it has a tremendous submarine life. This is why Kömür is one of the most important diving sites of Saroz. You can scuba-dive here and return home with beautiful diving experiences. For many divers, Kömür is like an old friend, one they visit every year. Because the water is clear, shallow, and diving entrance is easy. It has tremendous diversity of underwater creatures.


Unfortunately, nowadays Kömür has become highly popular. Especially in summer. Overcrowding is becoming a major issue in this tiny seacoast. So, I suggest you to visit this place during spring and fall.

Camping in this beautiful resort is a completely different experience. Especially if you catch a moment outside the season, it is possible to open your tent's door towards the sea and wake up with epic morning.


There are so many moments I went to the Kömür. But I want to talk about the camp especially in October we had in Kömür. After peak season, the port becomes silent. Only a few fisherman comes. Crowds turn back to city centers. So, Kömür turns to a perfect weekend city break. It is a privilege to be here with friends at such times. We were together, away from city mess, feeling calm and relax. After you load your camping staff, 4-5 hours trip from Istanbul to reach here, being in this atmosphere with your friends feels you lucky.


Our campfire not only provides us warmth, but also is an opportunity to know each other deeply. We enjoy talking while sitting around the fire. To develop a strong connection with nature, campfire is also important component of camping areas. To get rid of searching for wood, and having usable pieces for campfire, we prefer to buy our woods from wood shops of which a few remains in the city center. Every wood that came out of the wood bag makes the night cheerful. We become happy as the sparks scatter in the air. Our voice mixes with the sound of waves and this turns into a harmonious symphony. We feel like time goes by so fast when we were enjoying this atmosphere.


Late at night, we spend our time under the sky with millions of shining stars. At this point, because of limited construction, you are not affected by city light pollution. So, when the sky turns black, Milky Way Galaxy is nothing less than magical.

Last but not least, I advise that lie down with your sleeping bag on the beach, try to find a moment which everybody sleeps and sky is crystal clear. Enjoy the loneliness.

Here I am  with another Turkish traditional  recipe! Pumpkin Börek (pastry).  It's full with feta cheese and pumpkin mixture and garnished black cumin. You will love these crispy böreks which are made with paper thin pastry called Yufka. These cigar shaped rolls with cheese and pumpkin is very popular in my hometown. Traditionally the rolls are baked  in the oven; the result was very delicious with a bonus of being healthy.

Ingredients:

500 gr pumpkin puree


Small sugar/pie pumpkins provide the most flavorful additions to any baked dish or baked good and are great as a soup. These  are more tender and less stringy than the larger variety. Sugar pumpkins also have firm, sweet flesh compared to their big ones. Heat the olive oil, and sauté the onions and garlic until softened.
Halve the pumpkin, de-seed, place halves face down in a big pan with approx 2-3 water glass of  water but I prefer using homemade beef broth instead of water and added 1 water glass of milk. Finally add black pepper.  Cook over low heat until all the ingredients  are softened. Scrape out the pumpkin “meat” and then mash or puree as needed with mixer.

6 fresh yufka sheets

350 gr feta cheese, crumbled

1 egg
Salt and  black pepper to taste
½ glass olive oil
1 glass milk
1 teaspoon black sesame


Glaze:

1 glass milk
1/4 glass olive oil
1 egg
Mix the olive oil, milk and egg in a bowl.



Instructions

Preheat oven to 200C
Mash together the cheese and pumpkin. Season with salt and pepper.  However, if the feta cheese is already salty, you may wish not to add salt.



Layer the first layer of yufka  on flat dry surface  and brush with glaze which is  mix the olive oil, milk and egg.



Continue this for one another layers



Fold over the pastry from each side to seal in the mixture and then roll up like a cigar.



Wet the end of each pastry roll with water to seal. Grease the tray with a little olive oil. Brush the pastries with olive oil and egg mixture.


Sprinkle with black sesame seeds and bake until they are golden brown, about 25 – 30 minutes.


Zucchini with olive oil is one of my favorite dishes in Turkish cuisine. Dishes with olive oil have their own place in my mom's recipes. I am from Mersin which is a port on the Mediterranean coast of southern Turkey. So, my mom’s  recipes are  an authentic Mediterranean experience.

When the name of a dish ends with “with olive oil”, it means that “olive oil” is not used just for describing the type of oil in such dishes, but it is more like cooking and serving methods.
This dishes can be served cold or hot, but mostly in my hometown cold is preferred.

Ingredients

  • 5 medium zucchini, finely chopped
  • 2 medium onion,finely chopped, cut into 1/2" squares 
  • 3 garlic cloves, finely chopped
  • 1 medium size carrot

  • 1 medium capia pepper, finely chopped

  • 4 ripe tomatoes cut in small chunks
  • 3 tablespoon olive oil
  • 1 teaspoon ground black pepper 
  • 5 teaspoon tomato paste
  • 3 teaspoon pepper paste
  • dill (in small quantities)

Instructions

Heat the olive oil, and sauté the onions and garlic until softened.



Add tomato and pepper paste over onion and garlic.


Add the carrots and continue sautéing. 



Add the zucchini, finely chopped and continue sautéing.


Add the capia pepper , finely chopped and continue sautéing.


Finally add ,tomatoes,  salt, black pepper, small amount of dill  and water if using, cook over low heat until all the vegetables are softened.


Cook over low heat until all the vegetables are softened. Take off the heat and let cool completely. 


 Serve with small amount of uncooked dill.
I am doing experiments with tweets. For each tweet or each set of tweets, several APIs need to be called trough http protocol. This takes time. I often repeat the same experiment, which means issuing the same http request over and over again. Each request takes at least half a second. Considering a million tweets, one experiment takes half million seconds which makes over 5 days. And, this is the case for only one request per tweet.

In order to overcome this, I cache requests and responses. I made a library for php. Below I will be giving the codes. The library issues curl. But before issuing curl, if cache option is set, it first check if there is a cached content for this request. If there is, it simply returns the cache content. Otherwise, it requests the content over the network, and caches it for further requests.

Caching is done by saving the response to a file named by the md5 of the request url. Since the number of files in the cache directory is too high, I applied a two level strong mechanism which gets first two chracters of the md5 hash and saves the file in the directory named with those two chracters. This reduces the number of files in one directory, enabling a two level look-up in the file system.

Below is the simple code. It, for sure, needs further improvement but, for now, it works for me.


function curl_get($url, $cache=false)
{
$md5filename=getFileName("urlcache",$url);
if($cache==true)
        {
        if(file_exists($md5filename))
                return file_get_contents($md5filename);
        }
$defaults = array();
@$defaults[CURLOPT_URL] = $url;
@$defaults[CURLOPT_HEADER] = 0;
@$defaults[CURLOPT_RETURNTRANSFER] = TRUE;
@$defaults[CURLOPT_TIMEOUT] = 0;
$ch = curl_init();
curl_setopt_array($ch, $defaults);
if( ! $result = curl_exec($ch))
        {
        $retry = 0;
        while($retry < 10){
                sleep(10);
            $result = curl_exec($ch);
        if($result)break;
        if(!$result)
                trigger_error(curl_error($ch));
        }
curl_close($ch);
if($cache==true)
        {
        $f=fopen($md5filename,"w");
        fwrite($f,$result);
        fclose($f);
        }
return $result;
}

function getFileName($infix,$data)

{

$md=md5($data);
$st=substr($md,0,2);
$md=$st."/".$md;
@mkdir(__DIR__."/../caches/$infix/$st");
return __DIR__."/../caches/$infix/".$md;
}


Located in 6 km away from Teşvikiye village province of Yalova's Çınarcık district, the Highland Erikli, that many campers visit especially in summer.
Erikli is an ideal camping spot for meeting nature and walking on hiking trails. Our camp on the Erikli highland was held in one of the hottest weekends of June. We started from İstanbul. We passed through Gebze to Yalova with Eskihisar ferry.



During your hiking and camping on the Erikli Highlands, you should visit the waterfalls and watercourse. The atmosphere here instantly grabs you and is really beyond comparison with any other places. Flora and water resources are remarkable. There is a rich variety of plants here such as Chestnut, elm, linden, fir and apple trees. Resting under the shadows of these trees is like a dream that we always want to live in by escaping from the pain of everyday life becoming tiresome.
Starting from the highland, we stoped by the waterfall region after hiking through the pathway nearby the watercourse. The region called as twin-waterfalls because waterfalls are one just after another.



We swam in the waterfalls zone and enjoyed the time. Cooling down on a hot day in this big natural swimming pool  made us feel hungry. So, we made picnic there. Sandwiches which we prepared before for our trip is the best and fancy members of our picnic basket. After finishing our picnic it is time to walk the boundaries of our campsite to identify the best spot for our tent, cooking, and eating. We found  the most suitable point for our tent in the campground belonging to national parks.


We set our tent area near the stream edge. We were lucky because we have a picnic table near our tent area. So. we put our food and necessaries on the picnic table.

We burned our campfire which is  indispensable for our camping pleasure, and placed it around our chairs.
The sparkling golden hues of the fire, the crackles of the wood popping, the bright constellations above, gathered around a central focus… We love campfires. At this point ,We have a tip for you about campfire: In order not to be concerned about looking for wood, buy from where you live, or on the way to your camp. We have bought woods from woodchopper in the city center.
Especially, sitting around the cozy campfire in this campground and spending time in this spot, made us feel happier.


Our campfire did not only warm us up, but it also was a practical solution for us to cook our food at the same time.


At night, our campfire routine is singing songs.



The Erikli is referred as a plateau, but it is not a cold region because it is not much higher than sea level.  It is a place that your can enjoy hours without getting cold nearby a gentle fire. We have woken up for a wonderful morning after a good night sleep.


In the morning the day began in the middle of birds chirping and bright blue helicopter insects' tours over the stream. After our breakfast, it is time hike. A short wander through the woods, we follow a footpath up the lane in front of us, which brings us to the waterfalls region.


After the lunch in the waterfall district, we gathered our tent and stuff to return to the city.

Next Post Newer Posts Previous Post Older Posts Home