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 / 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>
@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 / 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 / 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 / Youtube Downloader - Mac - Using terminal.md
Last active March 8, 2024 01:29
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 / Vue, Laravel echo + socket.io + lumen (event, listener).md
Created August 22, 2019 06:43
Socket IO - Echo Server - Lumen, Vue JS - Laravel Echo.md
Vue, Laravel echo + socket.io + lumen (event, listener)
Steps:
  1. Install required npm packages
    socket.io-client laravel-echo
    
  2. Registering these two package to src/main.js file
    import Echo from 'laravel-echo'
    

window.io = require('socket.io-client')

@moaj257
moaj257 / cURL - File Download - Mac - Linux - Faster Download.md
Last active August 22, 2019 11:49
Fastest way to download a file in terminal. Download a file from the internet using terminal via curl.

You must have cURL installed on your system to get this command working.

curl -L ${URL} -o ${FILE_PATH_WITH_FILE_NAME}
  • Example
curl -L https://picsum.photos/1366/866 -o ./img.png
/* http://meyerweb.com/eric/tools/css/reset/
v2.0-modified | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@moaj257
moaj257 / Sublime v3.2.2 Build 3211 Key
Created April 24, 2020 04:58
Sublime v 3.2.2 build 3211 key
----- BEGIN LICENSE -----
Member J2TeaM
Single User License
EA7E-1011316
D7DA350E 1B8B0760 972F8B60 F3E64036
B9B4E234 F356F38F 0AD1E3B7 0E9C5FAD
FA0A2ABE 25F65BD8 D51458E5 3923CE80
87428428 79079A01 AA69F319 A1AF29A4
A684C2DC 0B1583D4 19CBD290 217618CD
5653E0A0 BACE3948 BB2EE45E 422D2C87
-------------------------------------------------------------------------------
Start.
-------------------------------------------------------------------------------
This is an Interrogation Guide for:
L.A. Noire - Playstation 3, Xbox 360, PC