Monday, January 19, 2026

Setup pyaudio on ubuntu

 pip install pyaudio


Note: Install portaudio system 


Ubuntu: sudo apt install portaudio19-dev libportaudio2 libportaudiocpp0 libasound-dev



Tuesday, November 25, 2025

setup mysql 8 for PHP 5

 add below in mysqld.cnf


collation-server = utf8_unicode_ci

character-set-server = utf8

default_authentication_plugin = mysql_native_password

Friday, August 8, 2025

Build Amplifi React App without source code

 use below in package.json

"scripts": {
"start": "react-scripts --max_old_space_size=4096 start",
"build": "cross-env GENERATE_SOURCEMAP=false react-scripts --max_old_space_size=4096 build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},

Monday, April 7, 2025

Tuesday, March 18, 2025

Create Node.js api with SSL

 Follow below code

import https from 'https';
import fs from 'fs';

var server=null;
if(process.env.SSL_DISABLED && process.env.SSL_DISABLED=="true" )
{
  console.log("SSL is disabled");
  server = http.createServer(app);
  server.listen(port);
  server.on('error', onError);
  server.on('listening', onListening);
}
else{
  const options = {
    key: fs.readFileSync(process.env.CERT_PATH+ '/privkey.pem', 'utf8'),
    cert: fs.readFileSync(process.env.CERT_PATH + '/fullchain.pem', 'utf8')
  };
  server = https.createServer(options,app);
  server.listen(port);
  server.on('error', onError);
  server.on('listening', onListening);
}

Wednesday, March 12, 2025

Launching Anuvadan.com

 I am pleased to announce that we have launched new AI based Hindi English Translation service: Anuvadan.com. You can visit it from Anuvadan.com

Monday, January 6, 2025

How to automatically launch venv in folder

 use below for Mac:

# Function to manage venv activation and deactivation
function manage_repoenv_venv() {
    # Root project directory and virtual environment path
    PROJECT_DIR="/Users/your_username/code/repo"  # Update the path for macOS
    VENV_PATH="$PROJECT_DIR/repoenv/bin/activate"

    # Check if the current directory or any subdirectory is within the project directory
    if [[ "$PWD" == "$PROJECT_DIR"* ]]; then
        # Activate venv if not already activated
        if [ -z "$VIRTUAL_ENV" ]; then
            source "$VENV_PATH"
        fi
    else
        # Deactivate the venv if active and leaving the project directory
        if [ -n "$VIRTUAL_ENV" ] && [[ "$VIRTUAL_ENV" == "$PROJECT_DIR/repoenv" ]]; then
            deactivate
        fi
    fi
}

# Hook into directory changes for Zsh
function precmd() {
    manage_repoenv_venv
}

# Source the script
source ~/.zshrc


for BASH:

PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND; }manage_kfenv_venv"