SEO of Hindi Website – SEO in Hindi – हिन्दी

If your website is in Hindi, this blog post is for you.

  • User URL in English or Hinglish (Which is typed by the user)
  • User URL as .in instead of .com, so Search engines can identify this is a targeted Indian user website.
  • Use HTML tag as lang = “hi” i.e. <html lang=’hi’>

    html lang hi
  • Target keywords in Hindi instead of pure English.
  • While searching for keywords add “………. in hindi” for example as below:in hindi
  • Add In Hindi keyword in the title (with or without an English sentence.)
  • Here is some example of Hindi-English mix title and content.
  • title-example-hindi-englishTItle-description-hindi-english
  • Add FAQ in website as below.
  • faq example questions in page.

    Cheers,
    Manish Shrivastava

Macbok M2 – Ruby on Rails installation – Problem [Solved]

Ruby – User RVM for Ruby installation and use ruby version greater than 3 for better performance.

Mysql:

Install via official site https://dev.mysql.com/downloads/mysql/

use youtube link how to install mysql here.

Add below line in ~/.bash_profile file :

export PATH=${PATH}:/usr/local/mysql-8.0.33-macos13-arm64/bin

where you may have to change mysql version in the path ie. mysql-8.0.33-macos13-arm64 to your mysql bin path.

It took more than 24 hours to solve this problem so I posted it in my blog here.

Thanks & Regards,

Manish Shrivastava

PWA enabled website

  1. Create your website code.
  2. Create manifest.json in the home directory with below code.
{
  "name": "My One Page PWA",
  "short_name": "PWA",
  "description": "A simple one-page PWA",
  "start_url": "/index.html",
  "display": "standalone",
  "background_color": "#ffffff",
  "theme_color": "#000000",
  "icons": [
    {
      "src": "icons/icon-192x192.png",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "icons/icon-512x512.png",
      "sizes": "512x512",
      "type": "image/png"
    }
  ]
}

3. Link manifest.josn in your project index file.

<link rel="manifest" href="/manifest.json">

4. Create a service-worker.js file.

self.addEventListener('install', (event) => {
  event.waitUntil(
    caches.open('my-cache').then((cache) => {
      return cache.addAll([
        '/',
        '/index.html',
        '/stylesheet.css',
        '/app.js',
        '/icons/img-192x192.png',
        '/icons/img-512x512.png'
      ]);
    })
  );
});

self.addEventListener('fetch', (event) => {
  event.respondWith(
    caches.match(event.request).then((response) => {
      return response || fetch(event.request);
    })
  );
});

5. Add the Register the service worker code to your main JavaScript file ( i.e. app.js)

if ('serviceWorker' in navigator) {
  window.addEventListener('load', () => {
    navigator.serviceWorker.register('/service-worker.js')
      .then((registration) => {
        console.log('Service worker registered:', registration);
      })
      .catch((error) => {
        console.error('Service worker registration failed:', error);
      });
  });
}

6. Host your website in HTTPS

7. Test your website via Chrome’s Lighthouse or the Application panel in Chrome DevTools.

Cheers!

How Ruby Developer can learn Blockchain development?

Question: I am a 10 year experienced ruby developer, I want to work in blockchain which language will I have to learn

Answer:

As Ruby (widely used for Rails development) is not used directly for Blockchain development. You will have to learn a language which is more compatible with Blockchain development. i.e. Solidity, Golang, C++ Or Node.js


So, you will likely need to learn Solidity for developing smart contracts on the Ethereum blockchain.

Solidity is a high-level programming language that is similar to JavaScript and is designed specifically for writing smart contracts that run on the Ethereum Virtual Machine (EVM) It is a statically typed language that supports inheritance, libraries, and complex user-defined types.

Solidity is not the only language used in blockchain development, but it is the most widely used for smart contract development on the Ethereum platform. Other blockchain platforms may use different languages, such as Golang for the Hyperledger Fabric blockchain, or C++ for the EOS blockchain.

While your experience with Ruby will not directly translate to Solidity or other blockchain languages, your existing programming knowledge and experience should help you learn and adapt quickly. You may want to start by studying Solidity‘s syntax, data types, and control structures, as well as its specific features related to blockchain development such as interacting with the blockchain, managing transactions and handling errors.

Get started Learning BlockChain

Learn Solidity Programming Language: This is designed for developing smart contracts that run on Ethereum. Click here to get started with Solidity.

Learn Flat and Relational DB

Learn Data Structure: i.e. Stack, LinkedList, and Queue.

Learn Terms related with blockchain ie. Mining, Public Distributed Ledger, Hash Encryption, Proof of work etc.


Learn How does Ethereum, HyperLedger, Hashgraph works?

Understand the Economics behind blockchain:

  1. Cryptography and Economics
  2. Cryptography in blockchain invoices hashing, Digital Signatures, and Proof of Work
  3. Hashing uses a cryptography algorithm using (sha256 in bitcoin and ethash in ethereum)
  4. Digital Signature: Private Key and Public Key.
  5. POW requires a miner to solve a mathematical puzzle to be able to add a block to the blockchain

Start Coding and Creating your own smart contract.Create own distributed application in Ethereum.

SOLID Principle in Ruby on Rails

SOLID Stands for:

  • Single responsibility principle
  • Open/closed principle
  • Liskov substitution principle
  • Interface segregation principle
  • Dependency inversion principle

The acronym stands for principles to help software engineers to create / write maintainable source code for long-term that use an OOPS language.

Single responsibility principle: Focus on One thing in a Class Seprately.

Open/closed principle: Class should be open for extension and closed for modification.

 Liskov substitution principle: The derived class must be capable of being substituted by its base class.

Interface Segregation principle:

Interface Segregation Principle (1996)

Dependency Inversion principle (DIP): Now a days used with Docker, Docker composer.

The Dependency Inversion Principle