Desk2Mob

Desk2Mob

Desk2Mob

If you want to display only a list of directories, enter the following command on the console.

ls -l | grep '^d'

If you want to show just a list of files, type the following command on the console.

ls -l | grep -v '^d'
Posted on February 10, 2014 by Amit Pandya in Linux

Single quotes and double quotes in Python

In Python, single quotes and double quotes create the same kind of string. These two lines are equivalent:

foo = "bar"
foo = 'bar'

If Jupyter or the Python console shows the value as 'bar', that does not mean Python changed your double quotes into single quotes. The console is showing ...

Posted on June 08, 2026 by Amit Pandya in python

sudo yum install gitk
Posted on February 06, 2014 by Amit Pandya in Linux, git

Article 4: From Basic RAG to Agentic RAG: How Enterprise AI Systems Plan, Search, Validate, and Self-Correct

In recent years, Retrieval-Augmented Generation (RAG) has become the foundation of enterprise AI applications. Organizations have successfully used RAG to build document assistants, knowledge management platforms, customer support systems, and internal sear...

Posted on June 11, 2026 by Amit Pandya in AI, RAG, Agentic-RAG

BDD in Rails

I created this mini series to highlight the importance of BDD in modern software development and why it matters for real teams. This guide explains how BDD improves communication between product, QA, and engineering by using shared behavior-focused language. It also shows how BDD helps teams reduce regressions, design cleaner code, and ship featur...

Posted on February 05, 2026 by Amit Pandya in BDD

How to Make a Simple Caffeinate-Style Application for Windows

On macOS, the caffeinate command is commonly used to keep the system awake during long-running tasks. Developers use it when running scripts, downloads, uploads, builds, backups, or remote sessions that should not be interrupted by system sleep.

Windows does not provide the exact same everyday...

Posted on June 23, 2026 by Amit Pandya in Windows, Caffeinate, powershell, batch file, productivity

I tried it in Ubuntu 14.04.2 LTS, and it is working fine

Step 1: (the purpose of the first line in designating which interpreter to use for the rest of the file), and save the file as a hello-world.rb

#!/usr/bin/env ruby
puts "Hello World!"

Step 2: (make the file executable with the below command)

chmod u+x... 
Posted on October 26, 2015 by Amit Pandya in Ubuntu, Ruby

You can do a two-way

First way

There is a “Computer” icon on the Desktop, right-click on that and select “Properties”, see image below

alt text

So, the System Properties Dialog will be open, and you can see under th...

Posted on April 17, 2014 by Amit Pandya in Windows7

Article 1: Understanding Retrieval-Augmented Generation (RAG)

Retrieval-Augmented Generation (RAG) is an AI architecture pattern that combines the reasoning capabilities of Large Language Models (LLMs) with external knowledge sources. Instead of relying solely on information learned during model training, RAG retrieves relevant information from documents, database...

Posted on June 08, 2026 by Amit Pandya in AI, RAG

Article 2: Building a Managed RAG Platform with Amazon Bedrock

Amazon Bedrock provides managed services that simplify the implementation of Retrieval-Augmented Generation systems. Instead of building chunking, embeddings, retrieval, and orchestration from scratch, organizations can use Knowledge Bases for Amazon Bedrock with managed foundation models.

<s...

Posted on June 08, 2026 by Amit Pandya in AWS, AI, RAG

Article 3: Building a Self-Managed RAG Platform

A self-managed RAG platform gives an organization direct control over document processing, embeddings, retrieval, model serving, infrastructure, security, and optimization. Teams usually choose this approach when they need specialized models, strict data-control requirements, custom retrieval logic, or potential cost...

Posted on June 08, 2026 by Amit Pandya in Self-Managed, AI, RAG

Open Command Prompt with administrator privileges. Please refer to the image below for more details. Right-click on Command Prompt and select Run as administrator.

Right-click Command Prompt and select Run as administrator.

...

Posted on August 21, 2025 by Amit Pandya in apache

  • A model just generates the model. Scaffold generates a controller and views, too.

./script/generate model mymodelname

  • creates an ActiveRecord model that is typically connected to a database, but doesn't have to be.

./script/generate scaffold scaffoldname</pre... 
Posted on February 03, 2014 by Amit Pandya in Rails2

  • Rails starts its web server on port 3000 by default. If you want to use a different port, such as 8888, run the command below.

ruby script/server -p 8888
Posted on February 03, 2014 by Amit Pandya in Rails2

SQL (Structured Query Language) categories in three languages

1. Data Definition Language (DDL)

Which is also known for Data Description Language used for specifying the database schema, like as creating, modifying, and destroying tables, views, indices, and stored procedures

  • A CREATE statement (example of Create Table)...
Posted on February 06, 2014 by Amit Pandya in SQL

Posted on April 29, 2014 by Amit Pandya in nodejs

Ruby - String Class

Posted on February 21, 2014 by Amit Pandya in Ruby - String-Class, Ruby

  • If you have multiple Rails versions installed on your application, and if you want to create a Rails application using the command below
rails demo_apps

  • In this case, it will create a Rails application "apps" with the latest version installed on our machine.

  • If y...

Posted on February 03, 2014 by Amit Pandya in Rails2

<% .... %> is Scriptlet 

and

<%= ... %> is Expression 
Posted on February 03, 2014 by Amit Pandya in Rails2

  • To rollback your most recent migration, execute the command below

rake db:migrate:rollback
  • If you want to rollback a specific migration, you need to execute the command below

rake db:migrate VERSION=
Posted on February 03, 2014 by Amit Pandya in Rails2

In Ruby 2.4.0, the Fixnum and Bignum classes were merged into Integer, resolving a long-standing issue.

  • Fixnum for small integers (range depends on implementation, usually limited to machine word size)
  • Bignum for larger integers (arbitrary precision)

Let’s see this in action.

Ruby 2.3.3

<code class="h... 
Posted on January 04, 2017 by Amit Pandya in Ruby