Skip to content

Instantly share code, notes, and snippets.

View rocktimsaikia's full-sized avatar
💕
Love yall <3

Rocktim rocktimsaikia

💕
Love yall <3
View GitHub Profile
@rocktimsaikia
rocktimsaikia / mongodb.md
Last active January 18, 2021 08:46
🔥 A tiny mongodb command cheatsheet for my personal use. Because I tend to forget them quite often

Common mongo shell commands/methods

show dbs : Show all the databases.
use <database> : switch/move into a database.
show collections : Show all the collections in that database.
db.<collection>.find() : Show all documents in the collection.
db.<collection>.help() : Show help on collection methods.
db.<collection>.drop() : Drops or removes completely the collection.
db.<collection>.deleteMany() : Delete documents from the collection.
db.dropDatabase(): Deletes a database.

@rocktimsaikia
rocktimsaikia / git_commands.md
Created August 15, 2020 20:16
Most used git commands

Initialize Git: git init

et everything ready to commit: git add .

et custom file ready to commit: git add index.html

ommit changes: git commit -m "Message"

ommit changes with title and description: git commit -m "Title" -m "Description..."

@rocktimsaikia
rocktimsaikia / install_nodejs_on_wsl.md
Last active August 15, 2020 19:57
Steps to install windows subsystem for linux ⚡

Installing nodejs in Windows Subsystem for Linux (WSL) ⚡

Assuming that you already have WSL installed in your windows.

Steps

  1. update Ubutu to it's latest version. Don't if you already have.

sudo is equivalent to running as administrator

sudo apt-get update
@rocktimsaikia
rocktimsaikia / index.js
Last active December 6, 2019 15:30
Use .hbs as file extension for express handlebars.
const express = require('express');
const exphbs = require('express-handlebars');
app.engine('.hbs', exphbs({extname: '.hbs'}));
app.set('view engine', '.hbs');
// Now you can use `.hbs` as file extension for express-handlebars