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
@sridhar02
sridhar02 / install.sh
Created July 29, 2024 03:07
Setup CloudFlare Warp LinuxArch installation & commands
```bash
#! /bin/bash
yay -S cloudflare-warp-bin
sudo systemctl start warp-svc
sleep 5
warp-cli register
warp-cli status
warp-cli connect
sleep 5
curl https://www.cloudflare.com/cdn-cgi/trace/ 2>/dev/null |grep warp
@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;
@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 / 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="[email protected]"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="[email protected]"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"

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)

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

This text is italic

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

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