Skip to main content

Posts

Showing posts from October, 2024

Setup OpenApI in Microsoft Azure

 Step 1: Goto QuickStart guide and search for Azure OpenAI, Click and land to the OpenAI dashboard. Step 2:  Create Azure openAI Account Add 1.Azure subscription 1 2. New Resource Group 3. Request to access to Azure OpenAI service Note: This is just really to get confirmation of your identity. 4. Name to your OpenAI account 5. Pricing tier: Standard SO Step 3: Network (select default) Step 4: Select tags Step 5: Review + Submit Microsoft AI will load in background and create deployement instance of OpenAI service. Let see How to use Microsoft Azure OpenAI and OpenAI Studio. Microsoft AI Studio is the combination of AI tools like open ai, machine learning etc.

Laravel Tip and Tricks

1. Database Connection 2. Authentication 1. Database connection Using DB class import class use Illuminate\Support\Facades\DB; Access Database Name -dump(\DB::connection()->getDatabaseName()); Access Database Connection Name through which the project is connected to the DB -dump(DB::connection()->getName()); Access in blade file/view| -{{\DB::getDatabaseName();}} 2. Authentication Get Current Auth user details import class use Auth; -dd(Auth::user)

Redis installation in Red Hat Linux

 In this post we will see step by step installation of Redis service in Redhat/CentOS operation system. To install Redis, run this command in terminal -dnf install redis This command will install the redis service in your machine. Verify installation -systemctl status redis -systemctl start redis -systemctl enable redis Note: Before start redis service set Linux Kernal overcommit memory to 1 by adding vm.overcommit_memory = 1 to /etc/sysctl.conf file. Why we should do that: As we know redis is in memory data store. It primarily uses RAM to store data. Redis and other processes use RAM memory. We set vm.overcommit_memory = 1 to make sure Kernal not overcommit the memory by allocating memory to new program which required more memory than available memory. In this scenario OOM (Out Of Memory) killer terminate the rest of processes. We also restricting Kernal not to terminate the important services running and also stop swapping redis and other importance service to device i/o device,...