Skip to content

Instantly share code, notes, and snippets.

View sridhar02's full-sized avatar
🏠
Working from home

Sridhar sridhar02

🏠
Working from home
View GitHub Profile

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

This text is italic

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

VSCode Commands

  • Toggle word wrap into 1 line or 2 lines - ALT+Z
  • Toggle Sidebar - CTRL+b

Bash Commands

  • Make Directory - mkdir (name of directory)
@sridhar02
sridhar02 / script.sh
Created November 11, 2021 09:18
Replace git commit history using a shell script
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
@sridhar02
sridhar02 / index.js
Last active August 3, 2022 18:50
Tic Tac Toe CLI MM
// A simple Tic-Tac-Toe game implmented in javascript
/**
// function takes input in format [4,0,1,3,7]
// output is either winner, incomplete, draw
// Max number of inputs that can be given are 9
@sridhar02
sridhar02 / index.js
Created August 8, 2022 16:24
Codewars Are they the "same"? Javascript solution
/**
* codewars exercise
* https://www.codewars.com/kata/550498447451fbbd7600041c/train/javascript
*/
function comp(array1, array2) {
//your code here
let result = false;
if (!array1 || !array2 || array1.length !== array2.length) {
result = false;