site updates
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
# Command Line Mastery for Web Developers
|
||||
|
||||
## Introduction to Command Line for Web Development
|
||||
- **Why Command Line**: Importance in modern web development.
|
||||
- **Getting Started**: Basic CLI commands, navigation, file manipulation.
|
||||
|
||||
## Advanced Git Techniques
|
||||
- **Rebasing and Merging**: Strategies for clean history and resolving conflicts.
|
||||
- **Bisect and Reflog**: Tools for debugging and history traversal.
|
||||
- **Hooks and Automation**: Customizing Git workflow.
|
||||
|
||||
## NPM Mastery
|
||||
- **Scripting and Automation**: Writing efficient NPM scripts.
|
||||
- **Dependency Management**: Handling version conflicts, updating packages.
|
||||
- **NPM vs Yarn**: Comparing package managers.
|
||||
|
||||
## Automating with Gulp
|
||||
- **Setting Up Gulp**: Basic setup and configuration.
|
||||
- **Common Tasks**: Examples like minification, concatenation, and image optimization.
|
||||
- **Optimizing Build Process**: Streamlining tasks for efficiency.
|
||||
|
||||
## Bash Scripting Essentials
|
||||
- **Script Basics**: Writing and executing scripts.
|
||||
- **Useful Commands**: Loops, conditionals, and input handling.
|
||||
- **Real-World Scripts**: Practical examples for automation.
|
||||
|
||||
## SSH for Secure Remote Development
|
||||
- **Key Management**: Creating and using SSH keys.
|
||||
- **Remote Commands**: Executing commands on remote servers.
|
||||
- **Tunneling and Port Forwarding**: Secure access to remote resources.
|
||||
|
||||
## Command Line Debugging Techniques
|
||||
- **Basic Tools**: Introduction to tools like `curl`, `netstat`, `top`.
|
||||
- **Web-Specific Debugging**: Analyzing network requests, performance issues.
|
||||
- **Logs Analysis**: Working with access and error logs.
|
||||
|
||||
## Docker Command Line Usage
|
||||
- **Docker CLI Basics**: Common commands and workflows.
|
||||
- **Dockerfiles**: Creating and understanding Dockerfiles.
|
||||
- **Container Management**: Running, stopping, and managing containers.
|
||||
|
||||
## Command Line Version Control
|
||||
- **Version Control Systems**: Git, SVN command line usage.
|
||||
- **Branching and Tagging**: Best practices for branch management.
|
||||
- **Stashing and Cleaning**: Managing uncommitted changes.
|
||||
|
||||
## Performance Monitoring via CLI
|
||||
- **Tools Overview**: `htop`, `vmstat`, `iostat`.
|
||||
- **Real-Time Monitoring**: Tracking system and application performance.
|
||||
- **Bottleneck Identification**: Finding and resolving performance issues.
|
||||
|
||||
## Securing Web Projects through CLI
|
||||
- **File Permissions**: Setting and understanding file permissions.
|
||||
- **SSL Certificates**: Managing SSL/TLS for web security.
|
||||
- **Security Audits**: Basic command line tools for security checking.
|
||||
|
||||
## Text Manipulation and Log Analysis
|
||||
- **Essential Commands**: Mastery of `sed`, `awk`, `grep`.
|
||||
- **Regular Expressions**: Using regex for text manipulation.
|
||||
- **Log File Parsing**: Techniques for efficient log analysis.
|
||||
|
||||
## Interactive Examples and Challenges
|
||||
- **Practical Exercises**: Step-by-step challenges for each section.
|
||||
- **Solution Discussion**: Explaining solutions and alternatives.
|
||||
|
||||
## Resource Hub
|
||||
- **Further Reading**: Links to advanced tutorials, books, and online resources.
|
||||
- **Tool Documentation**: Official documentation for the mentioned tools.
|
||||
|
||||
## FAQ and Troubleshooting Guide
|
||||
- **Common Issues**: Solutions to frequent problems and errors.
|
||||
- **Tips and Tricks**: Enhancing usability and productivity.
|
||||
|
||||
## Glossary
|
||||
- **Key Terms Defined**: Clear definitions of CLI and development terms.
|
||||
|
||||
75
docs/tech_docs/mkdocs.md
Normal file
75
docs/tech_docs/mkdocs.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# Setting Up a Virtual Environment for KnowledgeBase-Tech MKDocs Site
|
||||
|
||||
## Update PATH Environment Variable
|
||||
|
||||
Before installing `virtualenv`, ensure your PATH includes the directory where Python packages are installed. If you see a message like "The script virtualenv is installed in '/home/medusa/.local/bin' which is not on PATH," you'll need to update your PATH. Add the following line to your `.bashrc` or `.profile` file:
|
||||
|
||||
```bash
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
```
|
||||
|
||||
Then, reload your profile:
|
||||
|
||||
```bash
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
or for a login shell:
|
||||
|
||||
```bash
|
||||
source ~/.profile
|
||||
```
|
||||
|
||||
## Install Virtual Environment
|
||||
|
||||
Ensure Python and pip are installed, then install `virtualenv`:
|
||||
|
||||
```bash
|
||||
pip3 install virtualenv
|
||||
```
|
||||
|
||||
## Create the Virtual Environment
|
||||
|
||||
Create a virtual environment named `KnowledgeBase-Tech_env`:
|
||||
|
||||
```bash
|
||||
virtualenv KnowledgeBase-Tech_env
|
||||
```
|
||||
|
||||
## Activate the Virtual Environment
|
||||
|
||||
To start using the virtual environment:
|
||||
|
||||
```bash
|
||||
source KnowledgeBase-Tech_env/bin/activate
|
||||
```
|
||||
|
||||
## Install Dependencies
|
||||
|
||||
While the environment is active, install any required packages:
|
||||
|
||||
```bash
|
||||
pip install <package-name>
|
||||
```
|
||||
|
||||
## Freeze Requirements
|
||||
|
||||
To keep track of your project's dependencies, you can freeze the installed packages into a `requirements.txt` file:
|
||||
|
||||
```bash
|
||||
pip freeze > requirements.txt
|
||||
```
|
||||
|
||||
This file can be used to install the exact versions of the required packages on other setups or by other developers working on the project.
|
||||
|
||||
## Deactivate the Virtual Environment
|
||||
|
||||
When you're done working, deactivate the environment:
|
||||
|
||||
```bash
|
||||
deactivate
|
||||
```
|
||||
|
||||
## Working with the Environment
|
||||
|
||||
Remember to activate the `KnowledgeBase-Tech_env` environment every time you work on the KnowledgeBase-Tech Hugo site. This ensures all dependencies are isolated to this specific project.
|
||||
108
docs/tech_docs/python/JupyterLab.md
Normal file
108
docs/tech_docs/python/JupyterLab.md
Normal file
@@ -0,0 +1,108 @@
|
||||
# Installing JupyterLab on a Linux Server
|
||||
|
||||
This guide outlines the steps to install JupyterLab on a Linux server, enabling powerful data analysis and machine learning capabilities with remote access.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- A Linux server (Debian/Ubuntu or RHEL-based)
|
||||
- SSH access to the server
|
||||
- Basic command-line proficiency
|
||||
|
||||
## Step 1: Connect to Your Server
|
||||
|
||||
Start by establishing an SSH connection to your server.
|
||||
|
||||
```bash
|
||||
ssh username@your_server_ip
|
||||
```
|
||||
|
||||
Replace `username` with your actual server username and `your_server_ip` with the server's IP address.
|
||||
|
||||
## Step 2: Update Your Server
|
||||
|
||||
Ensure your server's package lists and installed packages are updated.
|
||||
|
||||
### For Debian/Ubuntu:
|
||||
|
||||
```bash
|
||||
sudo apt-get update && sudo apt-get upgrade
|
||||
```
|
||||
|
||||
### For RHEL-based systems:
|
||||
|
||||
```bash
|
||||
sudo yum update
|
||||
```
|
||||
|
||||
## Step 3: Install Python and Virtual Environment
|
||||
|
||||
JupyterLab requires Python. Install Python 3 and the package to manage virtual environments.
|
||||
|
||||
### For Debian/Ubuntu:
|
||||
|
||||
```bash
|
||||
sudo apt-get install python3-venv python3-pip
|
||||
```
|
||||
|
||||
### For RHEL-based systems:
|
||||
|
||||
Ensure you have access to the EPEL repository, then:
|
||||
|
||||
```bash
|
||||
sudo yum install python3-pip python3-virtualenv
|
||||
```
|
||||
|
||||
## Step 4: Create and Activate a Virtual Environment
|
||||
|
||||
Creating a virtual environment isolates your JupyterLab setup.
|
||||
|
||||
```bash
|
||||
python3 -m venv jupyterlab_env
|
||||
source jupyterlab_env/bin/activate
|
||||
```
|
||||
|
||||
## Step 5: Install JupyterLab
|
||||
|
||||
With the virtual environment activated, install JupyterLab using pip.
|
||||
|
||||
```bash
|
||||
pip install jupyterlab
|
||||
```
|
||||
|
||||
## Step 6: Start JupyterLab
|
||||
|
||||
Run JupyterLab, configuring it to allow remote access and to prevent it from trying to open a browser automatically.
|
||||
|
||||
```bash
|
||||
jupyter lab --ip=0.0.0.0 --no-browser
|
||||
```
|
||||
|
||||
**Note**: `--ip=0.0.0.0` makes JupyterLab accessible on all network interfaces of your server. For security, consider setting up a more restrictive IP or using additional security measures like SSH tunneling or a VPN.
|
||||
|
||||
## Step 7: Access JupyterLab
|
||||
|
||||
Upon starting JupyterLab, the terminal will display a URL beginning with `http://127.0.0.1:8888`. Replace `127.0.0.1` with your server's IP address or hostname to access JupyterLab from your browser.
|
||||
|
||||
## Step 8: Secure Your JupyterLab Instance
|
||||
|
||||
It's crucial to secure your JupyterLab instance, especially if accessible over the public internet.
|
||||
|
||||
### Set a Password for JupyterLab
|
||||
|
||||
Run this command and follow the prompts to create a password:
|
||||
|
||||
```bash
|
||||
jupyter notebook password
|
||||
```
|
||||
|
||||
### Consider Additional Security Measures
|
||||
|
||||
- Use SSH tunneling for a secure connection.
|
||||
- Configure a reverse proxy with SSL encryption.
|
||||
- Employ firewall rules to restrict access.
|
||||
|
||||
## Conclusion
|
||||
|
||||
You've now set up JupyterLab on your Linux server, ready for data analysis and machine learning projects with the power of server-grade hardware.
|
||||
|
||||
---
|
||||
Reference in New Issue
Block a user