Latest posts

Browse topics

Theming Drupal 8: How to Hide Site Name

I'm starting a new Drupal series - Drupal Tuesday, from now on - every Tuesday, Drupal related articles will be featured on my blog.(at least I hope so) 

It's not that I wouldn't had any previous Drupal tips and tricks, In fact I have more than 100 Drupal related articles already in archive.

Just recently I started working with Drupal 8, and since it involves a new learning curve even for me - I decided to refresh my skills and write down notes.

Let's start with a really simple issue - removing site name from Drupal 8.

What at start seems like a simple issue, might turn out to be a imminent problem. The truth is - it's super simple, but a little bit complicated if you come with a Drupal 7 background.

Let's hide site name the Drupal 8 way

For hiding site name in Drupal 8, we will need to go to the blocks structure (amazing, why I spent an hour trying to figure out why it's not under configuration section?)

Search for a block site branding (it should be in header section)

Site Branding Drupal 8

Site Branding Drupal 8

Click on the configure button:

Hiding Drupal Site Name

Hiding Drupal Site Name

Under the Toggle branding elements uncheck Site Name. 

Amazing, Simple and Fast. I wish I had such simple tutorial before I spent about two hours trying to override Drupal template files.

Hope this helps, drop me a comment or contact if you need any assistance!

How To Recover Permanently Deleted Files (Canon CR2, JPG and more) on Windows

In this article you will learn that not all is lost (in most cases), and it's still  possible to recover accidently deleted Canon CR2 files (I'm writing about Canon, as I'm writing from my own experience).

Here is my case study: I bought a new Asus laptop about a year ago, it did came with a 500GB built in HDD storage, the main purpose for this laptop was to perform some everyday computing and post-processing RAW images in Adobe Lightroom. If you are a photographer - you get the point.

It took me about one year - when I noticed I'm running out of disk space - most of my 500 GB disk space was occupied with images (Raw files), the photos kept rolling in, I was busy with my home remodeling works, and had no chance to visit city to buy an external HDD to make a backup of my image library, and for that moment it seemed a bit too pricey to buy a separate server (well what else a server architect could do, as to look for ways to build my internal/external cloud). For now I'm running few VPS on Linode spending about $100/mo. The disk space on all those servers combined, doesn't exceed 200GB, so to build a cloud on Linode for storing images only would cost me about $200/mo - too pricey, right. OK, there are other services for much cheaper price, but that's a topic of this article after all.

Anyhow - I started to delete some images I knew I will not need them in future, and I get some free space to upload new images. As I'm shooting mostly in RAW, one single picture weighs about 17-20MB, so it' s easy to run out of space in just a year. 

Then I realized - Adobe Lightroom is importing all CR2 files to a special folder (catalog), I'm post- processing all images and exporting them to other folder in already compressed folder in JPG format. So i actually don't need that Adobe Lightroom folder (Here a true-spirit Lightroomer won't agree with me, and fine with me - you are right), but in my case - That's a lot of space to be cleaned and roll in more pictures.

I did the magic - SHIFT+DELETE and I had extra 160GB of free space. Amazing. For about next 3-4 month' s I have a disk space and I don't need to worry about buying external HDD. Gosh, I felt so happy.

Then, this morning I realized - I still have few scenes not been post processed from that folder I deleted, and then the panic started - really valuable scenes - landscapes of Spain, Norway and more. Gosh I thought.

No, there must be a way to get my permanently deleted files back. The good news there are many ways of getting back your deleted files. As a lazy person I ended up with the easiest (still the riskiest way) - a little program for Windows Users - Recuva from Piriform.

Recuva can recover pictures, music, documents, videos, emails or any other file type you’ve lost. And it can recover from any rewriteable media you have: memory cards, external hard drives, USB sticks and more!

With help of Recuva I was able to get my recently deleted files back

.Recovering deleted files on Windows

Recovering deleted files on Windows

Recuva will work great if you have just recently permanently deleted your files. Here is the basics how this works:

Understanding Windows file deletion

When you delete a file in Windows, what happens?

Here's an example: You open Windows Explorer, navigate to C:\Files and highlight the file test.txt.

When you ask Windows Explorer to list the files in the C:\Files folder, Windows doesn't go through every file manually. Instead, it has an index of all the files in every folder that it can refer to - it's much faster. Windows Explorer uses that index to show you the names of the files.

Now, say you press the Del key. 

All Windows does is erase the test.txt entry from the index - not the hard drive. The contents of the file are still there, but you can't access it.

If only you could recreate that index entry so you could get at the file! That's what Recuva does.

When a file has an index entry (in something called the Master File Table (MFT), Windows makes sure not to overwrite the space on the hard drive where the file lives. Once you delete the file, however, Windows is free to use that 'blank space' for other files.

Eventually, if you add, copy, move or save enough other files, the contents of the test.txt file will be overwritten. The longer you wait, the harder it will be to recover.

Ironically, the shorter the life of the file, the harder it will also be to recover. Say you create test.txt at 9:01am and delete it at 9:10am. Chances are, it will be quickly overwritten by temporary files. Windows assigns the lowest MFT entry it can find for a new file. When you delete that new file, Windows marks that MFT entry as available. Since the MFT entry is a low number, Windows will reuse it as soon as new files are created.

How To Password Protect Your site with Nginx on Ubuntu 14.04

I was working on a new customers website, and I was looking for ways to showcase current development stage to the client, meanwhile hiding contents from others. Sounds familiar? In this server series guide I will provide info how to set up basic HTTP authentication with Nginx on Ubuntu 14.04.

Most details for this article are taken from Digital Ocean's guide: How To Set Up Basic HTTP Authentication With Nginx on Ubuntu 14.04 with few minor adjustments.

As I'm serving more than just one domain from this development server, I had to take an extra step and configure following domain to be default on this machine, as I will provide just the IP address to customer. For setting up default domain on Nginx, see this article: How To Setup Ngnix Default Domain For Not Configured Domains or IP Address

Step 1 — Installing Apache Tools

You'll need the htpassword command to configure the password that will restrict access to the target website. This command is part of the apache2-utils package, so the first step is to install that package.

sudo apt-get install apache2-utils

Step 2 — Setting Up HTTP Basic Authentication Credentials

sudo htpasswd -c /opt/etc/nginx/.htpasswd USERNAME

be sure to check out the correct path for your ngnix config, and in place of USERNAME enter your desired one. You'll need to authenticate, then specify and confirm a password.

Step 3 — Updating the Nginx Configuration

Now that you've created the HTTP basic authentication credential, the next step is to update the Nginx configuration for the target website to use it.

sudo nano /etc/nginx/sites-available/reinisfischer.com

be sure to replace reinisficher.com with your domain name

Under the location section, add following directives:

auth_basic "Private Property";
auth_basic_user_file /opt/etc/nginx/.htpasswd;

Save and close the file.

Step 4 — Testing the Setup

To apply the changes, first reload Nginx.

sudo service nginx reload

Now try accessing the website you just secured by going to http://your_server_ip/ in your favorite browser. You should be prompted with a following screen:

Nginx authentication screen

Nginx authentication screen

Congrats, you have just set up a basic HTTP authentication with Ngnix on Ubuntu 14.40. 

Sighnagi Museum

The Sighnaghi Museum is located in the charming Sighnagi town, region of Kakheti, Georgia.

I have paid many, many visits to Sighnaghi, but for the very first time I visited this museum just at the end of 2016. It was cloudy day, instead of beautiful landscapes and street photography we were left with no option, but to visit a museum. Well, few weeks ago I familiarized with famous Georgian painters Niko Pirosmani works and life, I was so impressed that I even ordered an artist to paint a reproduction of one of the most famous Pirosmani works- The Fisherman (The work is still not ready)

Sighnagi museum

Sighnagi museum

The Sighnaghi Museum was founded in 1947. The first exhibition opened on December 31st, 1950, comprising seven hundred artifacts. The Painting Gallery was founded at the museum in 1967, furnished with donations from well-known and beginner artists. Today, the ethnographic collection features five thousand artifacts, including textiles, copper and wooden domestic items, agricultural instruments, materials corresponding to viniculture, goldsmith works, different types of working instruments, and musical instruments.

The museum also contains a rich numismatic collection of about two thousand coins, among them ancient Sasanid Persian coins, and coins minted by Georgian monarchs Tamar, Lasha-Giorgi, and Erekle. Photo and documentary collections numbering around five thousand, and archeological exhibits are also represented in the museum reserves.

The Kakheti Archeological Research Base, co-existing with the Tbilisi Ivane Javakhishvili Institute of History, Archeology and Ethnography was founded in 1973. Its expeditions enriched the archeological collection of the museum. The Sighnaghi Museum joined the Georgian National Museum complex in 2007. The museum building was reconstructed, security systems were installed, new exhibitions were held, museum funds were supplemented, and the number of artifacts reached sixty thousand.  

On the second floor, visitors can find the permanent exhibition of the greatest Georgian self-taught artist of the late 19th-early 20th century, Niko Pirosmanashvili, often known simply as Pirosmani. The second floor also hosts numerous temporary exhibitions throughout the year. This hall hosted a Picasso exhibition in 2009 and a Western European exhibition in 2010. In contemporary Georgian history, the Sighnaghi Museum is the first museum to perfectly meet the Georgian National Museum Standards. Today, the museum represents a top-tier cultural, educational, and scientific institution. 

Ticket price: 3 GEL (as of 2016)

Gergeti Trinity Church

Gergeti Trinity Church is a must have to visit destination in Georgia. The church is located at an elevation of 2170 meters, under Mount Kazbegi some 160 km North from nations capital Tbilisi.

I have visited Gergeti church for some 3 times during my stay in Georgia, and always have hired either Jeep (Lada Niva) or Delica cars to get to the final destination. Let me explain - the road until the Gergeti village is pretty fair, but from the village there is a really bad road heading up to the church, and not many will drive up in the hill with their own cars - on the other hand, once at the destination, there are many experienced drivers available with Delica or Lada Niva cars - taking you up for 50-60 GEL (per car, not person). On the other hand I have noticed many hikers there, and actually I wouldn't mind to hike next time to Gergeti church - as I believe it's should be one of the most amazing experiences. 

Here is a joke from our latest trip - nobody from four of us wouldn't agree to drive up not for 50 lari or 100 US dollars. 

Our Delica car

Our Delica car

We hired this Delica car for 4 person group and agreed on price 50 GEL. Some drivers might ask 60 GEL, while others could agree on 40GEL (Prices as of October, 2016). The rumor has it - the municipality wanted to build a ropeway taking tourists up, but local population protested, as it's a pretty good income for taking tourists to the Gergeti church. As of now, there are no plans for constructing such ropeway - but let's agree, that would be awesome.

The ride takes about 15-20 minutes as the road is in very very very bad condition. Thus the distance is only about 6 km (I might be wrong)

Delica rally near Gergeti church

Delica car rally near Gergeti church

Yup, the most popular car (right side wheel) in this area for sure. Previous time I remember more Lada Niva cars were here.

Gergeti Trinity Church

Gergeti Trinity Church

The Gergeti Trinity Church is built in the 14th century, and is the only cross-cupola church in Khevi province. The separate belltower dates from the same period as the church itself. Its isolated location on top of a steep mountain surrounded by the vastness of nature has made it a symbol for Georgia. The 18th century Georgian author Vakhushti Batonishvili wrote that in times of danger, precious relics from Mtskheta, including Saint Nino's Cross were brought here for safekeeping. During the Soviet era, all religious services were prohibited, but the church remained a popular tourist destination. The church is now an active establishment of the Georgian Orthodox and Apostolic Church.

Walk in the Clouds

Walk in the Clouds

Yup, following scenes are not rare in Caucasus mountains.

The church is a popular waypoint for trekkers in the area, and can be reached by a steep 3 hour climb up the mountain.

Gergeti Trinity Church

Gergeti Trinity Church