Posts

Showing posts from June, 2024

dokcer

  sudo apt-get remove docker docker-engine docker.io sudo apt-get update sudo apt-get install apt-transport-https ca-certificates curl software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo apt-key fingerprint 0EBFCD88 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ xenial \ stable" sudo apt-get update sudo apt-get install docker-ce sudo docker run hello-world https://stackoverflow.com/questions/41133455/docker-repository-does-not-have-a-release-file-on-running-apt-get-update-on-ubun : Enable BuildKit for a Single Build Command You can enable BuildKit for a single build by setting the DOCKER_BUILDKIT environment variable: bash DOCKER_BUILDKIT=1 docker build -t code1590/docker-quickstart:latest .

Redis

redis data type

typescript

 setup typescript

Virtual Box

 kali org with virtualbox to see bit :  uname -m  If the output is x86_64 , your system is 64-bit. If it’s i686 or i386 , your system is 32-bit. ASRock:  F2 or DEL ASUS:  F2 for all PCs, F2 or DEL for Motherboards Acer:  F2 or DEL Dell:  F2 or F12 ECS:  DEL Gigabyte / Aorus:  F2 or DEL HP:  F10 Lenovo (Consumer Laptops):  F2 or Fn + F2 Lenovo (Desktops):  F1 Lenovo (ThinkPads):  Enter then F1. MSI:  DEL for motherboards and PCs Microsoft Surface Tablets:  Press and hold volume up button. Origin PC:  F2 Samsung:  F2 Toshiba:  F2 Zotac:  DEL

MY PC PROBLEMS

 Laptop keyboard automatic typing: xinput list  ie AT Translated Set 2 keyboard            id=15 [slave  keyboard (3)] xinput float #id  xinput reattach 15 3  Article:  Xinput

Quick backend

WORKSPACE ├── public │   └── temp │       └── .gitkeep ├── src │   ├── controllers │   ├── db │   ├── middleware │   ├── model │   ├── route │   ├── utils │   ├── constant.js │   ├── index.js │   └── server.js ├── .env ├── .gitignore ├── package-lock.json ├── package.json └── README.md   src/constant.js : // src/constant.js module.exports = {     PORT: process.env.PORT || 3000,     DB_URL: process.env.DB_URL || 'mongodb://localhost:27017/mydatabase' }; src/db/index.js : // src/db/index.js const mongoose = require('mongoose'); const { DB_URL } = require('../constant'); const connectDB = async () => {     try {         await mongoose.connect(DB_URL, { useNewUrlParser: true, useUnifiedTopology: true });         console.log('Database connected');     } catch (error) {     ...

REACT and NEXTJS

REACT OFFICIAL Cheetsheeet NEXTJS OFFICIAL Tips: Redeploy if you change some .env file  Deploy MERN app

HTML,CSS AND JS

Quick: MEGA HTML cheetsheeet   HTML,CSS and JS cheetsheet Simple js cheetsheet More: DetailJavascriptcheetsheet Regex of javascript SEO Theory of js View block in css

Git and Github

Github cheetsheet pdf SSH key setup Error: 1)@ WARNING: UNPROTECTED PRIVATE KEY FILE! @ for id_rsa Solution: chmod 600 id_rsa   //(in pwd) Easy start: git init  git add README.md  git commit -m "first commit"  git branch -M main  git remote add origin git@github.com:realsudarshan/unknown.git  git push -u origin main