How to install libwebsocket form git? (discussion with gemenie)

Installing libwebsockets (LWS) directly from GitHub uses standard CMake.

Step-by-Step Installation (Linux / macOS)

1. Install System Dependencies

LWS requires cmake, gcc/g++ (or clang), and SSL headers (OpenSSL/WolfSSL).

  • Ubuntu / Debian:

    Bash
    sudo apt update
    sudo apt install -y git cmake build-essential libssl-dev zlib1g-dev
    
  • Fedora / RHEL / CentOS:

    Bash
    sudo dnf install -y git cmake gcc gcc-c++ openssl-devel zlib-devel
    
  • macOS (Homebrew):

    Bash
    brew install git cmake openssl zlib
    

2. Clone the Official Repository

Clone the repository and check out a stable release tag (recommended over main for production reliability):

Bash
# Clone the repository
git clone https://github.com/warmcat/libwebsockets.git
cd libwebsockets

# (Optional) Checkout a stable release tag
git checkout v4.3-stable

3. Build and Install via CMake

LWS requires an out-of-source build directory:

Bash
# Create and enter build directory
mkdir build && cd build

# Configure build files
cmake .. \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_INSTALL_PREFIX=/usr/local \
  -DLWS_WITH_SSL=ON \
  -DLWS_WITH_HTTP2=ON

# Compile using all CPU cores
make -j$(nproc)

# Install system-wide
sudo make install

# Refresh shared library link cache (Linux)
sudo ldconfig

Key CMake Options (Customizing Your Build)

You can pass extra flags to cmake .. depending on your requirements:

FlagDefaultDescription
-DLWS_WITH_SSL=ONONEnables OpenSSL/TLS support.
-DLWS_WITH_HTTP2=ONONEnables HTTP/2 protocol support.
-DLWS_WITH_MINIMAL_EXAMPLES=ONOFFBuilds sample client/server code in the build folder.
-DLWS_MAX_SMP=81 / AutoSets maximum SMP thread count for multi-threaded service loops.
-DCMAKE_INSTALL_PREFIX=/usr/usr/localChanges the default installation target directory.

Verifying the Installation

To verify your installation, create a minimal C test file (test.c):

C
#include <libwebsockets.h>
#include <stdio.h>

int main() {
    printf("LWS Version: %s\n", lws_get_library_version());
    return 0;
}
Compile and run it:
Bash
gcc test.c -o test -lwebsockets
./test

How to install llvm-project form git in ubuntu (discussion with chatgpt)

1> git pull https://github.com/llvm/llvm-project.git
2> cd llvm-projct
3> 
cmake -G Ninja \
  -S llvm \
  -B build \
  -DCMAKE_BUILD_TYPE=Release \
  -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra"
4>
ninja -C build
5> 
sudo cmake --install build

Configure lsp-js for .jsx file in emacs (chatgpt reply unverified)

✅ Step 1: Add jsconfig.json (MOST IMPORTANT)

Create this in your project root:

{
"compilerOptions": {
"target": "ES2020",
"module": "ESNext",
"jsx": "react-jsx",
"allowJs": true,
"checkJs": false
},
"include": ["src"]
}

👉 This alone fixes:

  • random errors
  • unstable suggestions
  • tsserver confusion

✅ Step 2: Clean LSP config (minimal, stable)

Add this in .emacs:

(require 'lsp-mode)

(add-hook 'js-mode-hook #'lsp)
(add-hook 'jsx-mode-hook #'lsp)

;; 🔥 reduce noise (important)
(setq lsp-enable-symbol-highlighting nil)
(setq lsp-modeline-diagnostics-enable nil)
(setq lsp-diagnostics-provider :none)

;; optional: faster performance
(setq lsp-idle-delay 0.5)
(setq lsp-log-io nil)

✅ Step 3: Use correct TS server

Make sure installed:

npm install -g typescript

👉 lsp-mode uses tsserver internally


🔥 Step 4: Stop the blinking permanently

You already suffered this, so disable the noisy UI parts:

(setq lsp-ui-sideline-enable nil)
(setq lsp-ui-doc-enable nil)

If using lsp-ui.


Command to upgrade python pgAdmin4

source pgadmin4/bin/activate

pip install --upgrade --no-cache-dir pgadmin4

pkill -f pgadmin //to closing exising running instance of previous pgadmin4

pgamdin4 //restart a new pgadmin4 version

Ctrl+z; bg // to make pgadmin4 run in background

deactivate


Regarding site Free Browser Tool (https://free-browser-tools.mohitkrgupta.dev) (discussion with google search AI)

Various discussions with Google Search AI regarding site  Free Browser Tool are as below: site free-browser-tools.mohitkrgupta.dev what doe...