Sunday, September 6, 2020

Using bitbucket tools

 git remote add origin https://username@your.bitbucket.domain:7999/yourproject/repo.git

git add -a

git  commit -a -m "Reason"

git push -u origin master

Sunday, August 23, 2020

Securing web based video contents

 It's not so easy to secure video contents if it starts available in the web. But we need to make sure that it's hard to copy web video contents to prevent piracy losses.


1 - Hide video URLs

2 - Use one time signed URL for your video links

3 - Use use ID or something infront of the screen to prevent screen recordings

4 - Use encrypted HLS streamings

5 - Use DRM to securely deliver decryption key to access encrypted HLS contents (Widevine, FairPlay)

6 - Use Skara Player or other commercial player which support playing of encrypted HLS streams.


Saturday, August 22, 2020

Testing CORS localhost policy

 Something, chrome will restrict from displaying videos from third-party links because of the web security. 

Although you can remove restriction from your video hosting provider by adding your actual production domains, you still can't test these videos in your localhost. So How to fix it?


Step 01 - Add localhost as allowed domain inside the dashboard of your video hosting provider

Step 02 - Create a new chrome shortcut and rightClick > Properties section to change the shortcut properties

Step 03 - Add the following to the target field of the shortcut section

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --disable-gpu --user-data-dir=~/chromeTemp and click Apply



Note : Always run that created shortcut as administrator and now you will be able to bypass CORS restriction for testing.

Thursday, August 20, 2020

Setting up letsencrypt SSL on ubuntu

 Setting up the best free SSL certificate (letsencrypt) is pretty easy on Ubuntu with lampstack.

Step 01 - If you haven't installed lampstack for webhostings, do it first.

Step 02 - Go to lampstack directory cd /opt/lampstack[v]

Step 03 - Execute ./bncert-tool 

Step 04 - Now follow the instructions


Monday, July 6, 2020

Basic server requirements for a typical laravel app July 06, 2020

1 . Bitnami Lamp stack for linux or XAMPP fpr windows

2 . Cacert file in the php folder
https://curl.haxx.se/ca/cacert.pem

3 . Add extension=mongodb.so (PHP > 7) or extension=mongo.so (PHP < 7) in php/etc/php.ini file
(Note : PHP ver 7.4.7 or newer doesn't require .so extension)

4 . The below command will download and place the required mongodb php driver for Linux which will build and install mongodb.so file under /php/lib/php/extensions

(Linux)
pecl install mongo (PPH version < 7)
pecl install mongodb (PPH version > 7)

(For windowsm download place it manually in the php extension folder)
https://pecl.php.net/package/mongodb

Run apt-get install autoconf if you haven't installed autoconf module yet then run pecl command again

no acceptable C compiler found in $PATH

sudo apt-get update
sudo apt install build-essential
sudo apt install gcc command to install C Compiler and then run pecl command again



5 . php -m to see the loaded php modules and which should include mongodb