how to add auto_increment in mysql existing table

I have a pre-existing table, containing ‘fname’, ‘lname’, ’email’, ‘password’ and ‘ip’. But now I want an auto-increment column id. However, when I enter:

ALTER TABLE `myTable` ADD COLUMN `id` INT AUTO_INCREMENT UNIQUE FIRST;

varnish remove from ubuntu 18.04

uninstall or removes an installed varnish package itself from Ubuntu

$ sudo apt-get remove varnish 

remove varnish and it’s dependent packages which are no longer needed

$ sudo apt-get remove --auto-remove varnish 

use with purge options to varnish package all the configuration and dependent packages will be removed

$ sudo apt-get purge varnish 

purge options along with auto remove, will be removed everything regarding the package

$ sudo apt-get purge --auto-remove varnish 

Email : adityaypi@yahoo.com, Mobile : +91-9555699081

Add promo video to your google play store listing

You can add a promotional video to your store listing by entering a YouTube URL in the “Promo video” field. A promo video isn’t required, but it’s highly recommended as a fun, engaging way to show features of your app to potential users.

Need to know

Here are the most important things to keep in mind when adding a promo video:

  • Turn off monetization for the video. When users browse Google Play, we want them to see your app, not someone else’s ad.
  • Use a video’s YouTube URL, not a YouTube playlist or channel URL.
  • Don’t use an age-restricted video.
  • Use a video’s full YouTube video link instead of a shortened link.
    • Usehttps://www.youtube.com/watch?v=yourvideoid
    • Don’t usehttps://youtu.be/yourvideoid
  • Some sections of Google Play show groups of recommended games using videos. For a game to be eligible to be shown in these sections, use a video that’s filmed in landscape orientation

Monetized Play Store videos

Developers with a video in their store listing must disable ads by November 1, 2019 to keep the video eligible to be shown on Google Play. If your videos are monetized (that is, enabled for monetization on YouTube or containing copyrighted content with monetization claims), they may show ads, which can be confusing for users.

To keep your video active, you’ll need to:

  • Turn off monetization in your video, or
  • Upload a different video without monetization claims and update the URL in the Google Play Console.

Please note that if your video uses copyrighted content, turning off monetization for your video may not be enough to prevent ads. In that case you will need to use a different video without copyrighted content with monetization claims.

If your video is monetized or uses copyrighted content and you do nothing, your video will no longer play on your store listing after November 1, 2019.

Where it’s displayed

Your promo video is displayed before your screenshots on your app’s store listing and promotional areas on Google Play. Users can watch your promo video by selecting the Play button that overlays on your feature graphic.

Tips

  • Keep your videos short (30 seconds to 2 minutes) and focused on the most compelling features first.
  • If you have a device running Android 4.4 Kitkat or above, use the adb shell command screenrecord to capture video directly from your device.

when featured image display in google play store listing

To publish an app and have it be featured anywhere on Google Play, a feature graphic is required. Your feature graphic is a powerful tool to show off your creative assets and attract new users.

Important: To display a feature graphic on your app’s store listing, you also need to add a promo video.

Requirements

  • JPEG or 24-bit PNG (no alpha)
  • Dimensions: 1024px by 500px

Where it’s displayed

Your feature graphic is displayed before your screenshots on your app’s store listing. If you’ve added a promo video, a Play button will overlay on your feature graphic so users can watch your promo video.

Tips

  • Don’t include any copy or important visual information near the borders of the asset – specifically near the bottom third of the frame.
  • If adding text, use large font sizes.
  • Your graphic may be displayed alone without the app icon.

how to map ip address to domain name in ubuntu

ubuntu@nonames:/etc$  hostname --fqdn
nonames.com
ubuntu@nonames:/etc$

Setting your hostname:

  • You’ll want to edit /etc/hostname with your new hostname.
  • Then, run sudo hostname $(cat /etc/hostname).

Setting your domain:

  • Then, in /etc/resolvconf/resolv.conf.d/head, you’ll add then line domain your.domain.name (not your FQDN, just the domainname).
  • Then, run sudo resolvconf -u to update your /etc/resolv.conf (alternatively, just reproduce the previous change into your /etc/resolv.conf).

Both:

Finally, update your /etc/hosts file. There should be at least one line starting with one of your IP (loopback or not), your FQDN and your hostname. grepping out ipv6 addresses, your hosts file could look like this:

127.0.0.1 localhost
1.2.3.4 service.domain.com service
ubuntu@nonames:/etc$ hostnamectl
   Static hostname: nonames.com
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 0edddc7ee9394aec8b44c30670b611c5
           Boot ID: 4bdaebcdf36a487792fc02abf1a6b958
    Virtualization: xen
  Operating System: Ubuntu 18.04.3 LTS
            Kernel: Linux 4.15.0-1060-aws
      Architecture: x86-64

Facebook New Feature FACE RECOGNITION

Please review the face recognition setting

Your face recognition setting is off. We want to let you know what face recognition is and how we use it, and then you can decide whether to turn it on or keep it off.How we use face recognition

If you turn this setting on, we’ll create your face recognition template and use it in the following types of ways:

  • Find photos and video you’re in so we can help you review or share content, suggest tags and provide more relevant content and feature recommendations.
  • Help protect yourself and others from impersonation and identity misuse, and improve platform reliability.
  • Provide accessibility features by telling people with visual impairments who’s in a photo or video.

What we collect

Face recognition is a technology that analyses photos and videos you’re in to calculate a unique number, called a “template”. When your face recognition setting is on, we create and use your template to compare it to analyses of other photos or videos to recognise if you appear in that content.

We don’t share your template with anyone. We’ll keep your template while your account is active but will delete it if you turn your face recognition setting off.

Do you want to turn on the face recognition setting?

To understand how we use face recognition, please see the previous page. These examples help explain how your experience changes if you turn the setting on or keep it off. You can always manage this later in Settings.When this setting is on:

  • We can notify you about photos you’re in but haven’t been tagged in.
  • We can help protect against someone using your photo to impersonate you.
  • We can tell people with visual impairments when you’re in a photo or video through a screen reader.

When this setting is off:

  • We’ll still notify you when someone tags you in a photo.
  • We won’t be able to use face recognition to help stop someone from impersonating you, but we’ll continue to work to protect your account in other ways.
  • People with visual impairments will only be told that you’re in a photo if you’re tagged.

connection timeout ubuntu apache2 | apache configuration

Make a copy of the default Apache Configuration file

$ sudo cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf.bk

Edit the Configuration file

$ sudo nano /etc/apache2/apache2.conf

Changing the KeepAlive directives

Scroll down on the page until you see the below directives:

KeepAlive On: When set to ‘On’ Apache will allow persistent connections. This means more than one connection will be allowed per request. You should set this value to ‘On’ if it was set to ‘Off’ to activate KeepAlive on your server.

MaxKeepAliveRequests: This represents the maximum number of connections that should be allowed on your web server when KeepAlive is enabled.

You can set the value to ‘0’ for unlimited connections but this is not recommended. The default value is ‘100’ and this can work for most websites but you can keep this number high depending on the number of users visiting your website.

KeepAliveTimeout: This directive represents the number of seconds to wait for another request from the same client using the same connection. The default value is ‘5’ seconds.

Setting a high value on this directive may lead to a lot of idle connections and can degrade the performance of your server. So only adjust this value when users experience a lot of aborted connections when browsers try to establish connections to closed sessions.

Remember to press CTRL + XY and Enter to save the changes. Then, you need to restart Apache for the changes to take effect using the command below:

$ sudo systemctl restart apache2

How to stop DDOS attacks

  • Limiting the ammount of concurrent connections from the same IP address to your Server.
  • Identifying the offending IP.
  • And kill the Ongoing TCP Connections with TCPKILL.
  • Or use Cutter to kill the connections on any port/Network interface.
  • Drop it With Iptables.
  • Make the DROP Persistant after a reboot. (iptables save and restore)
  • Basic Iptables-save trouble shoot.
  • Stop Start Iptables

How to limit the amount of concurrent connections from the same IP address.

This will prevent the simpler DDOS attacks.

$ iptables -I INPUT -p tcp --dport 80 -i eth0 -m state --state NEW -m recent --set
$ iptables -I INPUT -p tcp --dport 80 -i eth0 -m state --state NEW -m recent --update --seconds 60 --hitcount 10 -j DROP
$ iptables-save >/etc/iptables.up.rules

 How to identify the IP that is attacking you

Issue the following command

$ netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

It will show a list of the current active connections by IP address and the offending IP is usually the one with a high number of connections:

1 127.0.0.1
1 Address
1 servers)
132 201.119.167.193

In the example above the first number is the number of connections followed by the Originating IP address, the results of the netstat command used are sorted by number of connections so your offender is usually at the end, (note that there maybe several offending IPs most of the times from anonymous proxies)
In this case the offending IP is the one with 132 connections.

How to reset iptables to default settings

Step 1 : Set accept all policy to all connections

Using below set of command you will set accept rule for all type of connections.

# iptables -P INPUT ACCEPT
# iptables -P OUTPUT ACCEPT
# iptables -P FORWARD ACCEPT

Step 2 : Delete all existing rules.

Using below set of commands, delete your currently configured rules from iptables.

# iptables -F INPUT
# iptables -F OUTPUT
# iptables -F FORWARD

Or you can do it in single command –

# iptables -F

SSL Certificates for Subdomains | WildCard SSL Certificates

What is Wildcard SSL Certificate?

The best way to secure and protect sub-domains can be accomplished through the use of a Wildcard SSL Certificate. These certificates offer convenience and affordability by use of a public key certificate which can be used with multiple sub-domains of a domain. Therefore, instead of purchasing and administering several separate SSL Certificates for each sub-domain, a business can utilize a Wildcard SSL Certificate.

How Does Wildcard SSL Certificate Work?

While Wildcard SSL Certificates provide versatility, only a single level of sub-domain matching is supported. For example, the use of *.company.com Wildcard could be:

  • subscribe.delhijurix.com
  • payment. delhijurix .com
  • login. delhijurix .com,
  • contact. delhijurix .com

Although, during the installation process there have been recommendations on changing the Wildcard domain names to match the actual account domain name (not installing as *.company.com). It is possible to have a Wildcard SSL Certificate installed to more than one sub-domain on a single IP address.

However, If you attempt to update a Wildcard SSL Certificate, the single IP address method might not be retained when the Wildcard is installed to more than one sub-domain on a single IP address. If there is no manual configuration then each sub-domain or domain will need its own dedicated IP address. A CPanel can be used for easier management over dedicated IP addresses when each site needs its own IP for SSL.

The WHM menu path which is used to install SSL Certificates is:

WHM: Main>>SSL/TLS>> Install an SSL Certificate and Setup the Domain

1. Copy and paste the Wildcard SSL Certificate into the first text area

2. Permit the rest of the text area to be filled automatically

3. Confirm that the SSL Key and CA bundle are accurate

4. Switch the Wildcard domain name to match the actual account domain name

5. Double check that the username and IP address match the actual account involved

Issues with the Wildcard SSL Certificate

Some mobile devices might not be able to connect because of authentication issues if they do not trust the certificates (because the certificate is not trusted by the customer’s browser).  To help prevent this error it is best to use a trusted provider of Wildcard SSL Certificates that issues a certificate the user’s browser will rely on. Basic browsers that do not support “Certificate Request” may have problems because the certificate appears invalid due to lack of verification.  Intermediate Certificates are used to connect an SSL Certificate to a trusted root certificate. Commercial Certificates have the trusted root certificate built in.

Although many platforms, devices, servers, services work well with the Wildcard SSL Certificates, there are some that are incompatible such as:

* Microsoft Office Communications Server

* Microsoft Lync Server

* Oracle Wallet Manager

* Windows Mobile 5 Devices

Why Should You Use Wildcard SSL Certificate as a Solution?

There are different products which can be used to provide SSL for websites. It is important to consider which domains and sub-domains need to be protected, how they can best be protected, and what cost is affordable for the business. A Wildcard SSL Certificate is a versatile tool, although it does have its limitations. IT Professionals and Web Security Experts should consider the effectiveness of the Wildcard SSL Certificate in providing the security they need in the areas that they desire.

Money can be saved when using a wildcard SSL certificate multiple level subdomains by avoiding the individualized costs of other various certificates. So long as the Wildcard has been properly installed it is a great resource in providing easier web security administration in a cost-effective manner. As mentioned before, the Wildcard SSL Certificate will only apply to those servers which are compatible and only to secure and protect sub-domains.  There are other options if protection is needed for various domain names. The wildcard SSL certificate is compatible with all major web servers like Apache, NGINX, IIS, Fortigate, Zimbra, Tomcat, Linux, and more.