Skip to content

Instantly share code, notes, and snippets.

View Babitabisht's full-sized avatar

Babita Bisht Babitabisht

  • New Delhi
View GitHub Profile
@Babitabisht
Babitabisht / ssh.md
Created July 30, 2019 11:14 — forked from bradtraversy/ssh.md
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh brad@192.168.1.29

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

sudo su &&
yum update -y &&
yum install -y httpd.x86_64 &&
systemctl start httpd.service &&
systemctl enable httpd.service &&
curl localhost:80 &&
echo "change security group inbound rules to http" &&
echo "hello world " > /var/www/html/index.html
@Babitabisht
Babitabisht / navbar.html
Created June 30, 2020 18:05
bootstrap navigation bar
<nav class="navbar navbar-expand-md navbar-dark bg-primary mb-4">
<div class="container">
<a href="" class="navbar-brand">ClientPanel</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarMain">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar -collapse" id="navbarMain">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
@Babitabisht
Babitabisht / callbackPromisesAsyncAwait.js
Last active July 19, 2020 17:07
callback, promises and async await syntax
const isCallback=false;
const isCallbackError= false;
testCallback=(callback, errCallback)=>{
if(isCallback){
callback({
success:true,
message:`callback success`
})
}else if (isCallbackError){
@Babitabisht
Babitabisht / mongodb_cheat_sheet.md
Last active December 28, 2020 07:02 — forked from bradtraversy/mongodb_cheat_sheet.md
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

# Find the latest version on https://github.com/creationix/nvm#install-script
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
# Add in your ~/.zshrc the following:
export NVM_DIR=~/.nvm
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
$ source ~/.zshrc
@Babitabisht
Babitabisht / tmux-cheatsheet.markdown
Last active November 6, 2021 11:53 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

  • ctrl+b+% split pane vertically
  • ctrl+b+" split pane horizontally
  • ctrl+b+right arrow (sliding to the right)

start new:

tmux
@Babitabisht
Babitabisht / redis_cheatsheet.bash
Created January 2, 2021 16:25 — forked from LeCoupa/redis_cheatsheet.bash
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@Babitabisht
Babitabisht / node_redis_cache.js
Created January 2, 2021 17:03 — forked from bradtraversy/node_redis_cache.js
Node.js & Redis Caching
const express = require('express');
const fetch = require('node-fetch');
const redis = require('redis');
const PORT = process.env.PORT || 5000;
const REDIS_PORT = process.env.PORT || 6379;
const client = redis.createClient(REDIS_PORT);
const app = express();
@Babitabisht
Babitabisht / node_nginx_ssl.md
Created February 10, 2021 08:00 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user