Skip to content

Instantly share code, notes, and snippets.

View lionrajkumar's full-sized avatar
💭
Must Learn Today

Rajkumar lionrajkumar

💭
Must Learn Today
View GitHub Profile
@lionrajkumar
lionrajkumar / PostmanToSwagger.md
Created July 10, 2025 12:09
Postman to Swagger (OAS 2) Documentation

Postman to Swagger (OAS 2) Documentation

Getting started

The easiest way to get started with this Collection is to click the fork button to fork this Collection to your own Workspace and use Postman to send requests.

Fetch the ID of the Collection you wish to convert. This can be found by selecting the Collection in Postman, navigating to the right-hand sidebar, clicking the Info tab (symbolized by the i icon), and copying the ID.

Generate a Swagger Schema

Method: GET

ETF Investments

i have purchased the stock like below
Date	Qty	Price	Amt
06-Jan	50	65.1	3255
11-Jan	152	66.08	10044.16
29-Jan	8	68.88	551.04
23-Apr	31	80.2	2486.2
03-May	31	78.75	2441.25
@lionrajkumar
lionrajkumar / DisableTextEditorOnGitMerge.md
Created March 3, 2025 16:06
Git to control whether Git opens the default editor during a merge commit.

You can set the GIT_MERGE_AUTOEDIT environment variable in Git to control whether Git opens the default editor during a merge commit. Here's how you can do it:

Temporarily (for the current session)

Run this command in your terminal:

export GIT_MERGE_AUTOEDIT=no  # Prevents Git from opening the editor

or

export GIT_MERGE_AUTOEDIT=yes  # Allows Git to open the editor

Html page refresh after a mins user this

<meta http-equiv="refresh" content="1" >
@lionrajkumar
lionrajkumar / AkauntingInstall.md
Created May 17, 2024 19:38
Online accounting software. Manage your money. Get invoices paid. Track expenses.

Akaunting

Online accounting software. Manage your money. Get invoices paid. Track expenses.

Installation

@lionrajkumar
lionrajkumar / ConvertJsonToPhpClass.md
Created December 21, 2023 17:14
Converting JSON String to PHP class

Converting JSON String to PHP class

class JSONObject {
    public function __construct($json = false) {
        if ($json) $this->set(json_decode($json, true));
    }

    public function set($data) {
 foreach ($data AS $key =&gt; $value) {
@lionrajkumar
lionrajkumar / CreateRssFeed.md
Created June 22, 2023 14:08
Creating Valid RSS feed by using PHP and Mysql

Creating Valid RSS feed in PHP

Mysql Table

CREATE TABLE `tbl_post` (
  `id` mediumint(8) UNSIGNED NOT NULL,
  `title` text,
  `description` text,
  `author` varchar(255) DEFAULT NULL,
  `datetime` datetime DEFAULT NULL,
  `image` varchar(150) DEFAULT NULL,
@lionrajkumar
lionrajkumar / UpgradeMariaDB.md
Last active December 3, 2025 05:19
Upgrade MariaDB to latest in Xampp

How to upgrade MySQL to MariaDB in XAMPP in 5 minutes on Windows

Here are the steps I used to to upgrad MySQL to MariaDB in XAMPP on Windows in about 5 minutes. After completing this process, MariaDB will look and work just like MySQL. You may even notice a performance increase in your website. No need to panic fellow developer, increased performance is perfectly normal and just one of the great benefits of MariaDB over MySQL.

IMPORTANT: Before you begin, always be sure to make a good backup. Do not do move instead of copy files in the instructions below as the original files may be required in order to back out and restore the original MySQL environment if it doesn't work out for you.

  1. Open a command prompt.
  2. Go to your xampp folder.
  3. Enter the following command: mysql/bin/mysql --version
  4. Take note of the version of MySQL you have installed. This is the version of MariaDB that you will need. You can now exit the command prompt as the rest of the instructions can be done through Windows Explorer

Script Code

<script src="js/checkout.js" STRIPE_PUBLISHABLE_KEY="<?php echo STRIPE_PUBLISHABLE_KEY; ?>" defer></script>

with in the script

// Get API Key
let STRIPE_PUBLISHABLE_KEY = document.currentScript.getAttribute('STRIPE_PUBLISHABLE_KEY');
@lionrajkumar
lionrajkumar / CopyPagesbetweenSitesinMultisiteNetwork.md
Created March 9, 2023 19:28
Copy Pages between Sites in Multisite Network.md

Copy Pages between Sites in Multisite Network

In this tutorial I will show you an easy way to duplicate WordPress pages to any of your sites within a multisite network.

There are different ways to implement that but we going to use WordPress bulk actions.

Copy Pages between Sites within WordPress Multisite network

As an example I decided to use Pages and we do not only copy them, but move between sites. If you need to create duplicates, you will have to change just one line of code.