Docker Compose Install MongoDB
Installing MongoDB using Docker Compose1234567891011121314151617181920212223242526version: "3.8"services: mongodb: image: mongo container_name: mongodb ports: - 27017:27017 volumes: - ./database:/data/db environment: - MONGO_INITDB_ROOT_USERNAME=admin - MONGO_INITDB_ROOT_PASSWORD=adminpwd # mongo-express: # image: mongo-express # container_name: mongo-express # restart: always # ports: # - 8081:8081 # environment: # - ME_...
docker install DVWA
Installing DVWA using DockerInstall the Damn Vulnerable Web Application (via a Docker container) quite easily, as it will take care of all the dependencies required (e.g. mySQL). Open a terminal within your Ubuntu instance. Install DVWA with the following command: sudo docker run —restart always -p 80:80 vulnerables/web-dvwa DVWA should now be installed and running. To access it, open up Firefox and browse to your localhost address. In other words, in the URL toolbar (where you type in URLs)...
docker install supabase
InstructionIt is recommended to use Linux, as issues may occur when connecting to the pool on Windows systems. docker install supabase12345678910111213141516171819202122232425# Get the codegit clone --depth 1 https://github.com/supabase/supabase# Make your new supabase project directorymkdir supabase-project# Tree should look like this# .# ├── supabase# └── supabase-project# Copy the compose files over to your projectcp -rf supabase/docker/* supabase-project# Copy the fake env varscp supabase...
Linux Foundation
File and DirectoryIn Linux, everything is treated as a file, including directories, devices, and even processes. A file is a collection of data that is stored on a disk or other storage device. A directory is a special type of file that contains information about other files and directories. Directory StructureThe Linux directory structure is hierarchical, with the root directory (/) at the top. Below the root directory, there are several standard directories, including: /bin: Contains essen...
Leetcode - 51. N-Queens
DescriptionThe n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other. Given an integer n, return all distinct solutions to the n-queens puzzle. You may return the answer in any order. Each solution contains a distinct board configuration of the n-queens’ placement, where ‘Q’ and ‘.’ both indicate a queen and an empty space, respectively. 12345Example 1: is an open-source technology that allows for applications to be packaged into ‘containers’ which include any required libraries and other dependencies. This makes it very easy to deploy applications (especially for large enterprises who need to setup their workstations), and you can run more applications on the same amount of hardware (as containers use less resources than virtual machines hosting the applications), among other benef...
Leetcode - 46. Permutations
DescriptionGiven an array nums of distinct integers, return all the possible permutations. You can return the answer in any order. 1234Example 1:Input: nums = [1,2,3]Output: [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]] 1234Example 2:Input: nums = [0,1]Output: [[0,1],[1,0]] 1234Example 3:Input: nums = [1]Output: [[1]] 1234Constraints:1 <= nums.length <= 6-10 <= nums[i] <= 10 All the integers of nums are unique. Approach12345678910111213141516def permute(nums): res = [] b...
Leetcode - 53. Maximum Subarray
DescriptionGiven an integer array nums, find the subarray with the largest sum, and return its sum. 12345Example 1:Input: nums = [-2,1,-3,4,-1,2,1,-5,4]Output: 6Explanation: The subarray [4,-1,2,1] has the largest sum 6. 12345Example 2:Input: nums = [1]Output: 1Explanation: The subarray [1] has the largest sum 1. 12345Example 3:Input: nums = [5,4,-1,7,8]Output: 23Explanation: The subarray [5,4,-1,7,8] has the largest sum 23. 123Constraints:1 <= nums.length <= 105-104 <= nums[i] <=...






