This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' | |
sudo apt-get update | |
sudo apt-get install google-chrome-stable | |
# Only Upgrade | |
sudo apt-get --only-upgrade install google-chrome-stable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is how to get rid of node_modules folder from Github! | |
1- Add .gitignore file(must be located in the root directory of your repo). | |
2- Write node_modules/ in .gitignore file. | |
It means ignore all directories called node_modules in current folder and any subfolders. | |
As alternative you can also use /node_modules or **/node_modules. | |
** is used for a recursive call in the whole project. | |
3- Open Terminal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const decToHex = (number) => { | |
return number.toString(16).padStart(2, "0") | |
} | |
const getRandomNumber = (min, max) => { | |
min = Math.ceil(min) | |
max = Math.floor(max); | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get remove nodejs | |
sudo apt-get remove npm | |
installing nodejs-legacy works if you first apt-get remove node (or better yet, purge) | |
Then go to /etc/apt/sources.list.d and remove any node list if you have | |
sudo apt-get update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sometimes there may be some issue with the NodeJS like the server is listening to some other port or | |
there may be some services which you want to run, but it shows an error like service is already running | |
or process is already running. At that time you need to kill all the instances of the NodeJS server at that time. | |
This method will help you to kill all the instances in NodeJS. | |
Command/CMD: Killings all instances of a NodeJS process via command line ==> killall node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update | |
sudo apt install snapd | |
sudo snap install insomnia | |
Take a look for more information ==> wgethttps://snapcraft.io/install/insomnia/ubuntu#install | |
Documentation ==> https://insomnia.rest/download |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#installing vscode on Debian | |
You can install vscode using following commands: | |
1- Start by updating the packages index and installing the dependencies by typing: | |
sudo apt update | |
2- sudo apt install software-properties-common apt-transport-https curl | |
3- Import the Microsoft GPG key using the following curl command: | |
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - | |
4- Add the Visual Studio Code repository to your system: | |
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is how to force Debian updating automatic date and time when enable/disable button doesn't works! | |
1- Open Terminal and check System clock synchronized, therefore type ==> timedatectl | |
2- if it's not synchronized (System clock synchronized: no NTP service: deactive) | |
then try to set ntp using ==> timedatectl set-ntp on | |
3- Remove cached ntp ==> apt remove ntp | |
Date and Time should be activated now! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1- Add a new branch in your Project useing ==> git checkout -b gh-pages | |
2- Try to change at least one character of your project's files and save(you need this to be able to push again) | |
3- git add -A | |
4- git commit -am "deployment branch added" | |
5- git push --set-upstream origin gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1- Open package.json file and add a homepage at the top before name | |
==> "homepage": "https://<USERNAME>.github.io/<PROJECT NAME>", | |
2- install gh-pages using ==> npm i gh-pages | |
3- Add pre-deploy and deploy to scripts field in package.json file ==> | |
"pre-deploy": "npm run build", | |
"deploy": "gh-pages -d build" | |
4- type npm run pre-deploy in terminal |
OlderNewer