SSH Authentication With Keys Instead Passwords

SSH is a must have tool for every System administrator or DevOps Engineer. It provides you a secure way to access remote servers. But, if you use standard password authentication there is always a chance that someone will break into system due to weak password.  This potential risk increases if multiple users have SSH access to the server, because system administrator can’t influence to the users to make a better passwords.

Continue reading SSH Authentication With Keys Instead Passwords

A Brief Introduction to Laravel Envoy

Laravel Envoy provides you a simple and elegant way to run common tasks on your remote servers. If you have ever used Fabric, Capistrano or other tools for managing remote tasks, you already have an idea how Envoy tasks will look like.

Laravel Envoy Installation

To install Laravel Envoy simply run:

after that, make sure ~/.composer/vendor/bin/envoy  is flagged as executable:

Continue reading A Brief Introduction to Laravel Envoy

Pro tip: Display all validation errors in Blade View

Every Blade View have $errors variable bounded to it unless you set different one by yourself. If you use controller based error handling, you will probably have something like this inside it:

We passed validation errors to the profile view using withErrors() method and inside that view you can display them:


Pro tip: How to repair an Ubuntu system with a Live CD

Few days I ago, I had a funny situation. Colleague of mine accidentally executed:

so instead for current directory  ./*  he changed owner for entire root file system. Sure, he tried to change back owner to the root:root , but root did not have any permissions anymore, since  /bin  is owned by another user.

Fortunately, this kind of  mess on Linux systems we can fix very quickly using Live CD. So reboot your system and run Live CD. Continue reading Pro tip: How to repair an Ubuntu system with a Live CD

Laravel: Model Observers

In the last tutorial I showed you how you can speed up a web application by caching database queries that are executed very often. However, there is a problem. Application will cache the resulted dataset, and in the future this dataset will be served. You need to tell your application to flush the cache every time when certain Model is updated. That way every time you edit, delete or add new Model item, old cache will be flushed, and query will be executed again. Afterwards, resulting new dataset will be cached and served until Model is updated once again. Continue reading Laravel: Model Observers