Skip to main content

Posts

Docker setup

  GETTING STARTED These instructions will get automated environment setup and running on your local machine. Prerequisites What things you need to install the software according to your OS: Windows: Please install Docker Desktop and configure WSL2, a step by step guide given in the following link. https://docs.docker.com/desktop/windows/install/ OR https://www.digitalocean.com/community/tutorials/how-to-install-the-windows-subsystem-for-linux-2-on-microsoft-windows-10 MacOS: Please install Docker Desktop and configure WSL2, a step by step guide given in the following link. https://docs.docker.com/desktop/mac/install/ Ubuntu: I nstall using the repository Before you install Docker Engine for the first time on a new host machine, you need to set up the Docker repository. Afterward, you can install and update Docker from the repository. Set up the repository Update the apt package index and install packages to allow apt to use a repository over HTTPS: sudo apt-get update sudo apt-get...
Recent posts

Helping Commands

 Git Reset =>   git reset --hard HEAD~1 ( https://stackoverflow.com/questions/927358/how-do-i-undo-the-most-recent-local-commits-in-git) git reset --hard <commit-hash> git push -f origin master

Recursive query in Laravel

<?php /** * Created by PhpStorm. * User: Zafar Hayat * Date: 6/26/2020 * Time: 7:06 PM */ namespace App\Services; use Illuminate\Support\Facades\DB; class FileWithDeepSearch { /** * @var PHPFunction */ private $PHPFunction ; /** * @var Common */ private $common ; /** * @var Filters */ private $filters ; public function __construct( PHPFunction $PHPFunction , Common $common , Filters $filters ) { $this -> PHPFunction = $PHPFunction ; $this -> common = $common ; $this -> filters = $filters ; } public function getQuery( array $data ) { $currentDirectoryFilesQuery = $this ->getCurrentDirectoryFilesQuery( $data ); $recursiveQuery = $this ->getRecursiveQuery( $data ); $recursiveQuery = $recursiveQuery ->unionAll( $currentDirectoryFilesQuery ); return $recursiveQuery ; } private function getCurrentDire...

Angular Helping Commands

Subject init Subject -> public readonly goToDirectory$ = new Subject< string >(); Subscribe Subject ->  s = this .common. goToDirectory$ . subscribe ((folder_id)                   => {      this . getListing (folder_id);} ); Emitt Data ->  this .common. goToDirectory$ . next (folder_id);

Laravel Help full commands

DB commands   Concat Two coloms:  DB::raw("CONCAT(u.first_name,' ',u.last_name) as full_name")     Search case sensitive:  -> where( 'name' , 'ilike' , $name ) Upload File In Chunks:: public function write(string $path , UploadedFile $file ) { Storage:: makeDirectory ( 'dir_name' ); $resource = fopen (Storage:: path ( $path ), 'a+' ); fwrite ( $resource , $file ->get()); fclose ( $resource ); }

What is Docker

https://www.edureka.co/blog/what-is-docker-container What is Docker? – Docker is a containerization platform that packages your application and all its dependencies together in the form of a docker container to ensure that your application works seamlessly in any environment.  – Docker is a containerization platform that packages your application and all its dependencies together in the form of a docker container to ensure that your application works seamlessly in any environment. What is Docker Image? Docker Image can be compared to a template which is used to create Docker Containers. They are the building blocks of a Docker Container. These Docker Images are created using the build command. These Read only templates are used for creating containers by using the run command. We will explore Docker commands in depth in the “Docker Commands blog”.  What is Docker Container? Containers are the ready applications created from Docker Images or you ca...