Archive for April 2019

Creating Laravel Package

If you already have Laravel move to Step 2 Step 1. Get Laravel composer create-project –prefer-dist laravel/laravel . Step 2. Create following folder structure: mkdir -p packages/aghayevi/modulename/src Step 3. Do the following cd packages/aghayev/modulename composer init   This command will guide you through creating your composer.json config.   Package name (<vendor>/<name>) [root/modulename]: aghayevi/modulename Description []: […]

Difference between abstract class and interface

In short, in case of full abstraction of methods you want to define use interface, in case of partial abstraction, if some methods you want to define are common among concrete classes but some are not then use abstract class Abstract class can have definitions of constants, abstract methods or method stubs (methods without body/implementation) […]

Top 10 security vulnerabilities by OWASP

A1 Injection (PHP include, global variables, Sql Injection through Url) A2 Broken authentication (To avoid broken authentication put into practice not leaving the login page for admins publicly accessible. Rename /wp-admin/ on WordPress to something else. Rename /admin in Magento to something else) A3 Sensitive data exposure (arp spoofing resulting traffic sniffing, stealing auth passwords, […]

Types and principles of object oriented programming

3 Main types of object oriented programming Creational, structural and behavioral patterns. Only these types are general because they address interactions with objects used within programming: object creation, object composition, and object interaction. Можно провести параллель с человеком если рассматривать человека с позиции Высшего Разума – человек был создан (creational), потом организована инфраструктура для деятельности […]

How-to disable screen lock (screensaver) on Ubuntu

Applications -> System Settings -> Brightness & Lock -> Lock On/Off