Quick tip: How to delete a tag from a Git repository?

The ability to tag specific changes in commit history has become very important. Programmers use git tag  to mark the releases (aka versions) of their applications. That way they can specify a desired version in their dependency tools.

Sometimes we make a mistake; we are all humans after all. We tag a wrong change set, or we tag a version on a wrong branch, or we even tag a version of other component in a current working directory. It happened to me, and I’m confident that some of those things happened to you to.

I’m sure most of you are very familiar with Git and tagging, but if you are not you should check the Git documentation page. If you are just looking for the way to delete the wrongly marked tag, then here’s the quick tip for you; so you don’t have to search through extensive documentation page.

Removing a Tag on the local repository

Deleting a tag on the local Git repository is pretty straightforward:

You can easily remember it because it’s so declarative. We can read this command as: use  git tag  command to delete -d  tag with a name 1.15 .

That will delete only the tag on your local repository. If you have already pushed your tag to the remote repository (to the Github for example), then you should also remove a tag on the remote repository.

Removing a tag on the remote repository

To delete a tag on the remote repository, we just need to push information about deleted tag to the remote:

or just:

And that’s it.

Laravel Accessors and Mutators

Laravel accessors and mutators are custom, user defined methods that allow you to format Eloquent attributes. Accessors are used to format attributes when you retrieve them from the database, while mutators format the attributes before saving them to the database.

Continue reading Laravel Accessors and Mutators

How to allow remote connections to PostgreSQL database server

After installing PostgreSQL database server, remote access mode is disabled by default for security reasons. However, sometimes you may want to allow remote connections to PostgreSQL database server from other locations, your home or office for example. In the next few lines I’ll guide you to do just that.

Connect to the remote server

First things first, you need to login to the remote server:

Continue reading How to allow remote connections to PostgreSQL database server

How To Redirect www To non-www And Vice Versa with Nginx

In this short tutorial I’ll show you how to make permanent redirect from a www URL to non-www and vice versa. I’ll assume that you have superuser privileges, sudo  or root access and Nginx already configured, as well as DNS records. More specifically, you need to have an A records for www.yourdomain.com  and yourdomain.com .

Redirect non-www to www

To redirect users from a plain, non-www domain to a www domain, you need to add this snippet in your Nginx domain configuration file:

Save your configuration and exit. Before restarting Nginx make sure to test your configuration:

Continue reading How To Redirect www To non-www And Vice Versa with Nginx

Facebook Privacy: Chats Are Being Scanned By A CIA Funded Company

During the testing of an application we’ve set up in a non-published area we have noticed some unusual activity. The link for the app was sent via facebook chat and afterwards comes the interesting part:

Lots of IPv6 for a single facebook check.

We went a step further. Forced IPv4 and tracked logs for an URL that was freshly created and sent via facebook chat.

x.x.x.x were our IP addresses and after the facebook checking the link there was no activity for ~3 minutes. As it can bee seen from the logs next hit was with “Recorded Future” signature (here we’ll disregard two hits that were made from US/Illinois 16 minutes later even though it’s not anything related to our company or area)

Search for terms “facebook chat scan” gave us this result: http://mashable.com/2012/07/12/facebook-scanning-chats/, but in this case it’s a third party. Company unrelated to Facebook.

Recorded Future is an American-Swedish startup backed by both Google Ventures and American intelligence agencies. ”

They also claim:

Considering that they were crawling links that were not published anywhere else and only sent via FB chat “open Web” seems to be an understatement.

Also, the interesting part is that recent focus of “Recorded Future” are terrorist groups such as ISIS, cyber criminal organizations and any kind of “public” internet activity that’s related to possible threats.

Conclusion would be that the privacy on facebook does not exist and their lawyers covered it well with EULA and their privacy policy: