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 / ReactNativeExpoPushNotification.md
Last active July 2, 2026 04:51
React Native Expo Push Notification

Use this Django backend code for:

POST https://api.myapplication.com/api/save-push-token/

Payload from React Native:

{
E:
for %%F in ("E:\frontend\*") do (
if /I not "%%~nxF"==".git" (
if exist "%%F\*" (
rmdir /s /q "%%F"
) else (
del /q "%%F"
)
)

You want the next task start date to depend on whether there are remaining hours left on the previous task’s end date.


Logic (very important)

  • 8 hours = 1 workday
  • If previous task hours is a multiple of 8 → no remaining hours → next task starts next working day
  • If previous task hours is NOT a multiple of 8
@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) {