Skip to content

Instantly share code, notes, and snippets.

View ahmadalnaib's full-sized avatar
🎯
Focusing

Ahmad Al-Naib ahmadalnaib

🎯
Focusing
View GitHub Profile
@ahmadalnaib
ahmadalnaib / Laravel-permission.md
Created February 28, 2024 13:14 — forked from muhozi/Laravel-permission.md
Setting proper permissions to laravel directory

Setting up proper permissions to a laravel directory

There are basically two ways to setup your ownership and permissions. Either you give yourself ownership or you make the webserver the owner of all files.

Webserver as owner (the way most people do it):

Assuming www-data is your webserver user.

@ahmadalnaib
ahmadalnaib / LLM.md
Created March 29, 2023 05:39 — forked from rain-1/LLM.md
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

const express = require("express");
const app = express();
//Sets the public folder as the external file folder
app.use(express.static("public"));
//Officially sets the view engine as ejs, therefore setting the default file type for readering to .ejs
app.set("view engine", "ejs");
app.get("/", function(req, res){

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@ahmadalnaib
ahmadalnaib / pipenv_cheat_sheet.md
Created May 4, 2019 15:34 — forked from bradtraversy/pipenv_cheat_sheet.md
Pipenv cheat sheet for common commands

Pipenv Cheat Sheet

Install pipenv

pip3 install pipenv

Activate

pipenv shell
@ahmadalnaib
ahmadalnaib / django_deploy.md
Created April 25, 2019 16:11 — forked from bradtraversy/django_deploy.md
Django Deployment - Digital Ocean

Django Deployment to Ubuntu 18.04

In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc

Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server

Create A Digital Ocean Droplet

Use this link and get $10 free. Just select the $5 plan unless this a production app.

@ahmadalnaib
ahmadalnaib / django_cheat_sheet.md
Created April 25, 2019 16:10 — forked from bradtraversy/django_cheat_sheet.md
Django command cheat sheet

Django 2.x Cheat Sheet

Creating a virtual environment

We need to create a virtual env for our app to run in: More Here Run this command in whatever folder you want to create your venv folder

python -m venv ./venv
@ahmadalnaib
ahmadalnaib / vsc_js_snippets.json
Created March 5, 2019 11:28 — forked from bradtraversy/vsc_js_snippets.json
VSCode JavaScript Snippets
{
"Console Log": {
"prefix": "cl",
"body": "console.log($1);",
"description": "Console Log"
},
"Named Function": {
"prefix": "nfn",
"body": ["function ${1:functionName}($2) {", " $3", "}"],
"description": "Named Function"
@ahmadalnaib
ahmadalnaib / webdev_online_resources.md
Created February 23, 2019 08:11 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)