1.  Generate Key and CSR file for request certificate in hosting by using command
    sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/ -out /etc/ssl/certs/
  2. Go to control panel which hosting provide SSL and download
  3. Now you will get 2 files are *.key and *.crt
  4. copy file domainName.key to /etc/ssl/private/
  5. copy file domainName.crt to /etc/ssl/certs/ 
  6. modify file default in sudo nano /etc/nginx/sites-available/default as bellow

server {

        listen 80 default_server;

        listen [::]:80 default_server;

        # SSL configuration


        listen 443 ssl http2 default_server;

        listen [::]:443 ssl http2 default_server;


        # Note: You should disable gzip for SSL traffic.

        # See:


        # Read up on ssl_ciphers to ensure a secure configuration.

        # See:


        # Self signed certs generated by the ssl-cert package

        # Don’t use them in a production server!


        # include snippets/snakeoil.conf;

        root /var/www/landing-page;

        # Add index.php to the list if you are using PHP

        index index.html index.htm index.nginx-debian.html;


        #ssl on;

        ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;

        ssl_ciphers         “HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES”;

        ssl_certificate     /etc/ssl/certs/;

        ssl_certificate_key /etc/ssl/private/;

        location / {

                # First attempt to serve request as file, then

                # as directory, then fall back to displaying a 404.

                try_files $uri $uri/ =404;




server {

       listen         80;


       return         301 https://$server_name$request_uri;




Leave a comment

Posted by on May 7, 2019 in Nginx


How to Fix App “is damaged and can’t be opened. You should move it to the Trash” Error on Mac


Mac OS Sierra 10.12.x

The premise is the same as shown for Mac OS 10.9.2 through 10.11.x except that the steps to enable the “Anywhere” option are different.

If you view your security settings under System Preferences | Security & Privacy, you will see there is no Anywhere option.

To enable the “Anywhere” option, run the following command in a terminal:

sudo spctl --master-disable

If you go back to System Preferences | Security & Privacy, you will see the Anywhere option enabled. Unlock the edit option by clicking on the padlock icon at the bottom of the window to change to Anywhere option.

At this point, you should be able to install the software.

This security setting affects your whole system. To reinstate the earlier security policy, run the following after the software is installed:

sudo spctl --master-enable

and then check your security settings are as you expect.

Copy from:

Leave a comment

Posted by on April 19, 2019 in Mac


Compile-time Error: control may reach end of non-void function with Xcode 10.2

Copy from:


temp solution :

add default: return "null"; between line 52 and 53,

inline const char *jsc::Value::typeof(JSContextRef ctx, const JSValueRef &value) {
    switch (JSValueGetType(ctx, value)) {
        case kJSTypeNull: return "null";
        case kJSTypeNumber: return "number";
        case kJSTypeObject: return "object";
        case kJSTypeString: return "string";
        case kJSTypeBoolean: return "boolean";
        case kJSTypeUndefined: return "undefined";
        default: return "null";

this working for me, waiting for the official solution

Leave a comment

Posted by on April 11, 2019 in iOS, Mobile Development, React Native


Config SSH with Siteground

For Windows

For MacOS

Leave a comment

Posted by on February 8, 2019 in Control Version, SSH


Android – Launcher Icon Size




I would create separate images for each one:

LDPI should be 36 x 36.

MDPI should be 48 x 48.

TVDPI should be 64 x 64.

HDPI should be 72 x 72.

XHDPI should be 96 x 96.

XXHDPI should be 144 x 144.

XXXHDPI should be 192 x 192.

Then just put each of them in the separate stalks of the drawable folder.

You are also required to give a large version of your icon when uploading your app onto the Google Play Store and this should be WEB 512 x 512. This is so large so that Google can rescale it to any size in order to advertise your app throughout the Google Play Store and not add pixelation to your logo.

Basically, all of the other icons should be in proportion to the ‘baseline’ icon, MDPI at 48 x 48.

LDPI is MDPI x 0.75.

TVDPI is MDPI x 1.33.

HDPI is MDPI x 1.5.

XHDPI is MDPI x 2.



This is all explained on the Iconography page of the Android Developers website:

copy from:

Leave a comment

Posted by on February 2, 2019 in Android, Mobile Development


Change package name for Android in React Native


Then manually switched the old and new package ids:

In: android/app/src/main/java/MY/APP/NEW_ID/

package MY.APP.NEW_ID;

In android/app/src/main/java/MY/APP/NEW_ID/

package MY.APP.NEW_ID;

In android/app/src/main/AndroidManifest.xml:


And in android/app/build.gradle:

applicationId "MY.APP.NEW_ID"

(Optional) In android/app/BUCK:


Gradle’ cleaning in the end (in /android folder):

./gradlew clean


Copy from:

Leave a comment

Posted by on January 25, 2019 in Mobile Development, React Native


How to use sudo with Touch ID on your Mac

By: Cabel (Twitter: @cabel)

How to enable Touch ID for sudo commands on your MacBook Pro with Touch Bar

  1. In Safari, paste the following into the search bar: file:///etc/pam.d/sudo.

    Alternatively, you can edit the file within the Terminal app itself using command-line text editors like emacs or nano; if you choose to do this, go to step 8, and skip steps 10-12.

  2. Press Command-I with the sudo file highlighted to open up the information screen.

  3. Click on the Lock icon in the bottom right corner.
  4. Enter your authentication information (or use Touch ID).
  5. Change the privileges of all users to Read & Write.

  6. Download TextWrangler, a free plain text editor, or use the plain text editor of your choice.
  7. Open the sudo file in TextWrangler (or equivalent).
  8. Paste auth sufficient on line 2 of the document (underneath the initial comment line)

    Note: If you get a note about the document being locked, go back to step 2-5 and make sure you’ve enabled Read & Write privileges on the document.

  9. Save the sudo file and close it.

  10. In Finder, press Command-I with the sudo file highlighted to open up the information screen.
  11. Change the privileges on all users to Read only.
  12. Click on the Lock icon in the bottom right corner.

Now, when you open Terminal and attempt a sudo command, you should be prompted with a Touch ID authentication in lieu of entering your administrator password.

Copy from:

Leave a comment

Posted by on September 24, 2018 in Mac