Skip to content

Instantly share code, notes, and snippets.

View novaDev315's full-sized avatar
🏠
Working from home

Mohamed novaDev315

🏠
Working from home
View GitHub Profile
@novaDev315
novaDev315 / pair-dual-boot-bluetooth.md
Created February 2, 2023 14:03 — forked from madkoding/pair-dual-boot-bluetooth.md
Pairing bluetooth devices (keyboard or mouse) in dual boot with Linux Ubuntu and Windows 10

1) Pair ALL bluetooth devices in linux (it is to have the files you will need to edit later)

2) Pair ALL bluetooth devices in Windows 10. If you know how, get the MAC address id from your bluethooth keyboard, we will need it later

3) Reboot and go back to Linux

4) Install chntpw package, this is needed to read the registry keys from Wintendo

sudo apt-get install chntpw
@novaDev315
novaDev315 / Windows activate.txt
Created May 22, 2021 05:32
some steps to activate windows 10 all version
1- Open cmd as administrator
2- Uninstall previous product key
slmgr.vbs /upk
3- Add the new key for your windows version
slmgr /ipk NPPR9-FWDCX-D2C8J-H872K-2YT43
4- Add kms server url
slmgr /skms kms8.msguides.com
5- Activate windows
slmgr /ato
@novaDev315
novaDev315 / nginxproxy.md
Created July 20, 2020 11:53 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@novaDev315
novaDev315 / node_nginx_ssl.md
Created June 13, 2020 07:32 — 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

@novaDev315
novaDev315 / MicrosoftOffice2019Activate.cmd
Created May 22, 2020 19:24
Microsoft Office 2019 Activate
@echo off
title Activate Microsoft Office 2019 ALL versions for FREE!&cls&echo ============================================================================&echo #Project: Activating Microsoft software products for FREE without software&echo ============================================================================&echo.&echo #Supported products:&echo - Microsoft Office Standard 2019&echo - Microsoft Office Professional Plus 2019&echo.&echo.&(if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16")&(if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16")&(for /f %%x in ('dir /b ..\root\Licenses16\ProPlus2019VL*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&(for /f %%x in ('dir /b ..\root\Licenses16\ProPlus2019VL*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&echo.&echo ============================================================================&ech
@novaDev315
novaDev315 / .angular-htaccess.md
Created February 23, 2020 11:31 — forked from julianpoemp/.angular-htaccess.md
Optimal .htaccess configuration for Angular 8, Angular 7, Angular 6, Angular 5 (and older) app in production incl. fix for the angular browser caching issue.

Optimal htaccess file for angular apps

Angular supports two different routing strategies:

  • PathLocationStrategy — the default "HTML5 pushState" style.
  • HashLocationStrategy — the "hash URL" style.

If you are using PathLocationStrategy you have to append a .htaccess file to your production server in order to make routing work. For more information about Angular's routing click here.

What is the problem?

@novaDev315
novaDev315 / db help query .sql
Last active February 18, 2020 20:42
SQL helper query script
/* fix nodejs app connection mysql */
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
flush privileges;
/*** change database and table character encode ***/
/* for MySQL 5.5.3 abd newer version */
ALTER DATABASE databasename CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE tablename CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
/* for MySQL 5.5.2 or older which didn't support 4-byte UTF-8 */
ALTER DATABASE databasename CHARACTER SET utf8 COLLATE utf8_unicode_ci;
@novaDev315
novaDev315 / mime types
Created September 7, 2018 10:59
The Complete List of MIME Types
Suffixes : applicable Media type and subtype(s)
.3dm x-world/x-3dmf
.3dmf x-world/x-3dmf
.a application/octet-stream
.aab application/x-authorware-bin
.aam application/x-authorware-map
.aas application/x-authorware-seg
.abc text/vnd.abc
.acgi text/html
.afl video/animaflex
@novaDev315
novaDev315 / status.php
Last active June 25, 2018 19:09
Rappelz Game Ports check using php and send data back to js client
<?php
header('Access-Control-Allow-Origin: *', false);
header('Content-Type: application/json;charset=utf-8');
ini_set('max_execution_time', 0);
ini_set('memory_limit', -1);
/*
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
*/