Skip to content

Instantly share code, notes, and snippets.

View sayanmoulick's full-sized avatar
📌
Little Reminder

SAYAN MOULICK sayanmoulick

📌
Little Reminder
  • INDIA
View GitHub Profile
@sayanmoulick
sayanmoulick / convert-js-to-ts.sh
Created December 26, 2024 19:48
+x convert-js-to-ts.sh && +x convert-js-to-ts.sh
#!/bin/bash
# Function to rename JavaScript files to TypeScript
rename_js_to_ts() {
for file in "$1"/*.js; do
if [ -e "$file" ]; then
new_file="${file%.js}.ts"
mv "$file" "$new_file"
echo "Renamed $file to $new_file"
fi
@sayanmoulick
sayanmoulick / jvm-cmd.md
Created September 15, 2024 09:51
manage java through jvm
sudo apt update
java -version
sudo apt search openjdk
sudo apt install openjdk-17-jdk
ls -lsa /usr/lib/jvm
which java
ls -lsa /usr/bin/java
ls -lsa /etc/alternatives/java
@sayanmoulick
sayanmoulick / 1.mongodb-aws-setup-guide.md
Created September 30, 2023 14:42 — forked from calvinh8/1.mongodb-aws-setup-guide.md
MongoDB Setup Guide for AWS EC2 Instances with Auth Enabled

MongoDB AWS EC2 Setup Guide

You can see my latest update in my blog here https://medium.com/@calvin.hsieh/steps-to-install-mongodb-on-aws-ec2-instance-62db66981218

Credits:

Big thanks to Elad Nava and Shane Rainville for writing the above articles that allow me to conduct this guide. If by all means that I violated original post's copyright, please contact me.

@sayanmoulick
sayanmoulick / http-status-codes.md
Created July 20, 2023 08:31
HTTP status codes

HTTP Status Codes

Informational

100 Continue

101 Switching Protocols

102 Processing (WebDAV)

@sayanmoulick
sayanmoulick / fix-the-mess.md
Created July 20, 2023 04:41
reset master to empty commit

Problem

I want to create branch based development & PR-based deployement, but already have a bunch of commits already in master.

Requirement to reset master to empty commit without loosing your precious codes.

Solution

  1. Create a backup branch of master
git checkout -b feature/master-backup master
@sayanmoulick
sayanmoulick / access-multiple-github-accounts-by-ssh.md
Created July 14, 2023 09:33
access multiple github accounts with ssh keys

Problem

Two Github accounts:

  1. personal
  2. work

I want to do git operations on both accounts from same computer by ssh.

Solution

Use ssh keys and define host aliases in ssh config file.