Skip to content

Instantly share code, notes, and snippets.

View asalhani's full-sized avatar

Adib asalhani

View GitHub Profile
@asalhani
asalhani / nodejs-How-To-Debug
Last active June 10, 2018 01:13
How to debug Node.JS script file (app).md
#### Methode #1:
To debug in chrome dev tool: <br/>
1. run ```node --inspect-brk app.js```
2. go to ```chrome://inspect ```
----------------------------------
#### Methode #2: <br/>
Using VS Code debugging <br/>
1- Change to the root of the local repository.
cd <YOUR_PROJECT>
2- List all your branches:
git branch -a
3- Checkout the branch you want to use.
git checkout feature
4- Confirm you are now working on that branch:
@asalhani
asalhani / git-common-commands.md
Last active July 1, 2018 06:19
Git commands - Most used
  • List branches:
    git branch

  • create new branch:
    git checkout -b <NEW_BRANCH_NAME>

  • Push the branch on github:
    git push origin <NEW_BRANCH_NAME>

  • Change working branch:

@asalhani
asalhani / Docker Commands
Created June 2, 2019 08:45
Docker Commands
# list images
docker image ls
# build image from Dockerfile
docker image build -t "<name>:latest" <dockerfile_path>
ex:
docker image build -t "custom-ubu" Dockerfile
# remove image
@asalhani
asalhani / Manually download and Install Windows Subsystem for Linux (WSL) distro packages.md
Last active May 30, 2024 17:20
Manually download and Install Windows Subsystem for Linux (WSL) distro packages
@asalhani
asalhani / ansible-ubuntu-windows.md
Last active December 14, 2019 18:13
Setup and Configure Ansible: Server: Zorin OS 15 (18.0.3) - Client: Windows 10

Install Ansible

sudo apt-get update
sudo apt-get install software-properties-common
sudo apt install ansible
sudo apt install python3-pip
sudo apt install python-pip
pip install --trusted-host files.pythonhosted.org --trusted-host pypi.org --trusted-host pypi.python.org oauthlib -vvv

pip3 --version
@asalhani
asalhani / ansible-note.md
Last active December 15, 2019 15:03
Ansiable Notes

Inventory sample:

# Sample Inventory File

# Web Servers
web_node1 ansible_host=web01.xyz.com ansible_connection=winrm ansible_user=administrator ansible_password=Win$Pass
web_node2 ansible_host=web02.xyz.com ansible_connection=winrm ansible_user=administrator ansible_password=Win$Pass
web_node3 ansible_host=web03.xyz.com ansible_connection=winrm ansible_user=administrator ansible_password=Win$Pass

# Database Servers
@asalhani
asalhani / vscode-remote-connection-ssh-config.md
Last active December 15, 2019 16:57
Configure Visual Studio Code (VS Code) to connect remotely to Linux (SSH)

Configure Visual Studio Code (VS Code) to connect remotely to Linux (SSH)

Source

VS Code Remote Development

1- Check to see if you already have an SSH key on your local machine C:\Users\your-user\.ssh\id_rsa.pub if not, create new key (Powershell cmd)