Skip to content

Instantly share code, notes, and snippets.

@mohamedelsabbagh
mohamedelsabbagh / node_nginx_ssl.md
Created April 15, 2024 05:05 — 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

@mohamedelsabbagh
mohamedelsabbagh / nationalities.json
Created September 4, 2023 05:07 — forked from othmanoss/nationalities.json
list of nationalities english arabic json
{
"Afghan": "أفغاني",
"Albanian": "ألباني",
"Algerian": "جزائري",
"American": "أمريكي",
"Andorran": "أندوري",
"Angolan": "أنغولي",
"Antiguans": "انتيغوا",
"Argentinean": "أرجنتيني",
"Armenian": "أرميني",
@mohamedelsabbagh
mohamedelsabbagh / CommunityCard.tsx
Created September 2, 2023 21:44 — forked from adrianhajdin/CommunityCard.tsx
Build and Deploy a Full Stack MERN Next.js 13 Threads App | React, Next JS, TypeScript, MongoDB
import Image from "next/image";
import Link from "next/link";
import { Button } from "../ui/button";
interface Props {
id: string;
name: string;
username: string;
imgUrl: string;

GraphQL Queries & Mutations

These are the GraphQL queries and mutations for the YouTube course.

Get names of all clients

{
  clients {
    name
 }
@mohamedelsabbagh
mohamedelsabbagh / gist:3defbda416dc588967df25d14bd7bf49
Created March 14, 2023 01:09 — forked from moxet/gist:7e27a359785c8fcf05d80877115e6a94
Add DataTable features to Crocoblock Table Builder
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.11.2/datatables.min.css"/>
<script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.11.2/datatables.min.js"></script>
<script>
jQuery(document).ready(function($) {
$('.jet-dynamic-table').DataTable();
});
</script>
@mohamedelsabbagh
mohamedelsabbagh / terminal-commands.md
Created September 14, 2022 23:11 — forked from bradtraversy/terminal-commands.md
Common Terminal Commands

Common Terminal Commands

Key Commands & Navigation

Before we look at some common commands, I just want to note a few keyboard commands that are very helpful:

  • Up Arrow: Will show your last command
  • Down Arrow: Will show your next command
  • Tab: Will auto-complete your command
  • Ctrl + L: Will clear the screen

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

@mohamedelsabbagh
mohamedelsabbagh / Markdown Cheat Sheet.md
Created March 31, 2022 00:25 — forked from bradtraversy/sample.md
Markdown Cheat Sheet

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

This text is italic