Skip to content

Instantly share code, notes, and snippets.

View MnifR's full-sized avatar
🎯
Focusing

Raouf MnifR

🎯
Focusing
View GitHub Profile
@MnifR
MnifR / README.md
Created April 16, 2021 08:54 — forked from hofmannsven/README.md
Git Cheatsheet
@MnifR
MnifR / mac-setup-redis.md
Created April 5, 2021 17:07 — forked from tomysmile/mac-setup-redis.md
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis

Cli

rabbitmqctl Service management and operator tasks https://www.rabbitmq.com/rabbitmqctl.8.html

rabbitmq-diagnostics Diagnostics/Health check

rabbitmq-plugins Plugin management

rabbitmqadmin Operator tasks over HTTP API
@MnifR
MnifR / sql-mongo_comparison.md
Created March 18, 2021 10:18 — forked from aponxi/sql-mongo_comparison.md
MongoDb Cheat Sheets

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

connect

mongo --hostname <hostname> \
	--port <port> \
	-u <username> \
	-p <password> \
	--athenticationDatabase <database>

disconnect

/* *******************************************************************************************
* SYNOPSIS
* http://nodejs.org/api/synopsis.html
* ******************************************************************************************* */
var http = require('http');
// An example of a web server written with Node which responds with 'Hello World'.
// To run the server, put the code into a file called example.js and execute it with the node program.
##############################################################################
# VIM CHEATSHEET
# WEBSITE: http://www.vim.org/
# DOCUMENTATION: https://vim.sourceforge.io/docs.php
##############################################################################
##############################################################################
# CURSOR MOVEMENTS
##############################################################################
##############################################################################
# NGINX
# DOCUMENTATION: https://nginx.org/en/docs/
##############################################################################
sudo nginx -t # Check syntax
sudo systemctl status nginx # nginx current status
sudo systemctl reload nginx # Reload nginx
sudo systemctl restart nginx # Restart nginx
sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/ # Link website
git init # initiates git in the current directory
git clone <address> # creates a git repo from given address (get the address from your git-server)
git clone <address> -b <branch_name> <path/to/directory> # clones a git repo from the address into the given directory and checkout's the given branch
git clone <address> -b <branch_name> --single-branch # Clones a single branch
git add file.txt # adds(stages) file.txt to the git
git add * # adds(stages) all new modifications, deletions, creations to the git
git reset file.txt # Removes file.txt from the stage
git reset --hard # Throws away all your uncommitted changes, hard reset files to HEAD
git rm file.txt # removes file.txt both from git and file system
@MnifR
MnifR / nginx-socketio-ssl-reverse-proxy.conf
Created October 5, 2020 15:23 — forked from gmanau/nginx-socketio-ssl-reverse-proxy.conf
How to setup nginx as nodejs/socket.io reverse proxy over SSL
upstream upstream-apache2 {
server 127.0.0.1:8080;
}
upstream upstream-nodejs {
server 127.0.0.1:3000;
}
server {
listen 80;