Skip to content

Instantly share code, notes, and snippets.

View somerongit's full-sized avatar
🐬
Deploying 🚀

Someron Bakuli somerongit

🐬
Deploying 🚀
View GitHub Profile

MongoDB Doc Sheet

Show All Databases

show dbs

Show Current Database

@somerongit
somerongit / dockerCliCommends.sh
Last active July 7, 2022 05:21 — forked from LeCoupa/cli.docker.sh
Docker Commends + Tips & Tricks --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
docker build -t friendlyname . # Create image using this directory's Dockerfile
docker run -p 4000:80 friendlyname # Run "friendlyname" mapping port 4000 to 80
docker run -d -p 4000:80 friendlyname # Same thing, but in detached mode
docker exec -it [container-id] bash # Enter a running container
docker ps # See a list of all running containers
docker stop <hash> # Gracefully stop the specified container
docker ps -a # See a list of all containers, even the ones not running
docker kill <hash> # Force shutdown of the specified container
docker rm <hash> # Remove the specified container from this machine
docker rm $(docker ps -a -q) # Remove all containers from this machine
@somerongit
somerongit / redis_commend.bash
Last active July 7, 2022 05:19 — forked from LeCoupa/redis_cheatsheet.bash
Redis Commends - 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.
/* *******************************************************************************************
* GLOBAL OBJECTS > ARRAY
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array
* ******************************************************************************************* */
// Global object: properties
Array.length // Reflects the number of elements in an array
// Global object: methods