UPDATE: FATAL ERROR while cloning from Bitbucket private repository

FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey)
If this is error, which You are getting form Bitbucket server while trying to clone Your private repository, you can try following:

  1. Start Git bash command line at the location where You want have Your repository cloned.
  2. Copy clone command from Your repository web page – like: git clone git@bitbucket.org:username/repositoryName.git ./desiredTargetFolderName
  3. first paste following command into bash: ssh -vT git@bitbucket.org
  4. Than run clone command and it should work

Hope it will help someone.


If You`re still having problems with pulling data  from Your repository (because of permission), check Your home ssh folder, if it contains correct public key file, usually it is:


UPDATE: Keep order of rows while using WHERE IN () – MySQL

I was just solving issue, where I needed to keep an order of items returned from the MySQL database listen in the WHERE IN clause.
Original query:

SELECT * FROM table WHERE id IN (1,5,8,73,5,4,88)

This will return rows ordered by its primary key (in my case column id). Here is updated query, which will keep order of items listed in WHERE IN clause:

SELECT * FROM table WHERE id IN (1,5,8,73,5,4,88) ORDER BY FIELD(id,1,5,8,73,5,4,88)

Please note first item in brackets behind ORDER BY – there should be set same column, which was used at WHERE IN clause.

UPDATE: There was missing function called FIELD after ORDER BY – code is fixed now.

How get Facebook profile ID (uid) when using vanity URL

When You are working with facebook apps, you do need sometimes to add administrators or moderators to Your application. If selected person is not in Your friend list, You cannot add him to the list using auto-suggest box. Thats the moment, when You will need to know user`s facebook profile id (uid). Real problem is coming when user is using Facebook vanity URL for his/her profile (like www.facebook.com/some.selected.vanity.url). Continue reading

Google Maps API & PHP+MySQL – working with radius and distance

I needed to find out how to work with Google Geo API in my last project and especially with calculating a radius and distance between two geo points. Another goal was to get a latitude and longtitude from the address typed in the register form (in the background). Finally it was quiet easy. Here is the solution: Continue reading