Skip to content

Instantly share code, notes, and snippets.

View moaj257's full-sized avatar
:atom:
Changing the world, little by little

Mohan Raj moaj257

:atom:
Changing the world, little by little
View GitHub Profile
@moaj257
moaj257 / Youtube Downloader - Mac - Using terminal.md
Last active February 28, 2025 20:13
Download youtube videos via mac terminal
  1. Open terminal.
  2. Use any one of following to install youtube-dl (A downloader written in python).
    • Fire these 2 command if you have curl installed.
    sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl 
    sudo chmod a+rx /usr/local/bin/youtube-dl
    
    • Fire these 2 commands

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl

@moaj257
moaj257 / Node JS - Setup in cPanel - Adding vHosts.md
Last active August 22, 2019 04:07
Setup NodeJS in cPanel - Editing vHosts - in a subdomain
  • Find your vHost file
<VirtualHost ip_address>
  ServerName domain_name
  ServerAlias www.domain_name
  DocumentRoot /home/user_name/domain_name
  ServerAdmin webmaster@domain_name
  UseCanonicalName Off
  • Add the following highlighted code to your apache conf file
@moaj257
moaj257 / DigitalOcean-LAMP-Wordpress-Ubuntu.md
Last active November 13, 2023 06:27
Install WordPress with LAMP on Ubuntu 18.04

After configuring your Digital Ocean Server using my previous gist, you may follow this. Else go to my previous gist https://gist.github.com/moaj257/2d1a602fcec3f3dd9afd5f667119d342.

Step 1: Create a MySQL Database and User for WordPress

To get started, log into the MySQL root (administrative) account by issuing this command:

mysql -u root -p

Create a new database for a new wordpress installation. I am using wordpress as the database name.

@moaj257
moaj257 / DigitalOcean-LAMP-Ubuntu.md
Last active August 13, 2019 09:24
Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 18.04

Step 1 — Installing Apache and Updating the Firewall

sudo apt update
sudo apt install apache2

Adjust the Firewall to Allow Web Traffic

sudo ufw app list
@moaj257
moaj257 / Lumen-Laravel-Htaccess.md
Last active January 21, 2023 17:41
Laravel/Lumen Shared Hosting htaccess

Copy htaccess code to your laravel/lumen .htaccess file.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*) public/$1 [L]
</IfModule>