sms-retriever verify in android not working after update

The SMS Retriever API provides a fully automated user experience and should be used when possible. It does, however, require you to place a custom hash code in the message body, and this may be difficult to do if you’re not the sender of that message.

First download app signed certificate der from your play console account.

Then convert it to yourkeystore.keystore with keystore extension using this command:

keytool -importcert -alias nonames098 -file deployment_cert.der -keystore keystore.jks -storepass nonames098
               OR
 keytool -import -alias nonames -keystore keystore.jks -file deployment_cert.der  

Then create string hash using the created keystore.

 keytool -exportcert -alias youralias -keystore keystore.jks | xxd -p | tr -d "[:space:]" | echo -n  com.test.testapp `cat` | sha256sum | tr -d "[:space:]-" | xxd -r -p | base64 | cut -c1-11


MSU1WTd7Goy
SMS Verification APIs

Automatic SMS Verification with the SMS Retriever API

With the SMS Retriever API, you can perform SMS-based user verification in your Android app automatically, without requiring the user to manually type verification codes, and without requiring any extra app permissions. When you implement automatic SMS verification in your app, the verification flow looks like this:

  1. A user initiates SMS verification in your app. Your app might prompt the user to provide a phone number or use the Smart Lock for Passwords hint selector if that information wasn’t required to create the user’s account.
  2. Your app makes a request to your server to verify the user’s phone number. Depending on what information is available in your user database, this request might include the user’s ID, the user’s phone number, or both.
  3. At the same time, your app calls the SMS Retriever API to begin listening for an SMS response from your server.
  4. Your server sends an SMS message to the user that includes a one-time code to be sent back to your server, and a hash that identifies your app.
  5. When the user’s device receives the SMS message, Google Play services uses the app hash to determine that the message is intended for your app, and makes the message text available to your app through the SMS Retriever API.
  6. Your app parses out the one-time code from the message text and sends it back to your server.
  7. Your server receives the one-time code from your app, verifies the code, and finally records that the user has successfully verified their account.

HTTP to HTTPS and HTTPS to HTTP redirect in php/laravel without htaccess

HTTP to HTTPS


<?php
//echo empty($_SERVER['HTTPS']);
if(empty($_SERVER['HTTPS'])) {
$redirect= "https://www".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
//header("location:$redirect"); //php
return redirect()->to($redirect)->send(); //laravel
}
?>

HTTPS to HTTPS


<?php
//echo empty($_SERVER['HTTPS']);
if(!empty($_SERVER['HTTPS'])) {
$redirect= "http://www".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
//header("location:$redirect"); //php
return redirect()->to($redirect)->send(); //laravel
}
?>

how to check user load on ubuntu

different commands to check the load average in linux.Loadaverage is the system load,which is a measure of the amount of computational work that a computer system performs.When you run the command in output,you will see one, five, and fifteen minute moving load average of the system.The practical of load average command is done in Red Hat,CentOS,Ubuntu and Debian system.

ubuntu@ip-172-31-93-130:/$  cat /proc/loadavg
0.00 0.00 0.00 2/196 7337
ubuntu@ip-172-31-93-130:/$
ubuntu@ip-172-31-93-130:/$ w
 10:47:40 up  3:28,  1 user,  load average: 0.06, 0.02, 0.00
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
ubuntu   pts/0    49.36.134.191    07:19    4.00s  0.16s  0.00s w
ubuntu@ip-172-31-93-130:/$
ubuntu@ip-172-31-93-130:/$ uptime
 10:48:42 up  3:29,  1 user,  load average: 0.02, 0.01, 0.00
ubuntu@ip-172-31-93-130:/$
ubuntu@ip-172-31-93-130:/$ top
top - 10:49:24 up  3:30,  1 user,  load average: 0.01, 0.00, 0.00
Tasks: 120 total,   1 running,  79 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.0 us,  0.2 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem : 15650116 total, 14640708 free,   479316 used,   530092 buff/cache
KiB Swap: 16777212 total, 16777212 free,        0 used. 14870788 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
    1 root      20   0  159732   8980   6676 S   0.0  0.1   0:03.37 systemd
    2 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kthreadd
    4 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/0:0H
    6 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 mm_percpu_wq
    7 root      20   0       0      0      0 S   0.0  0.0   0:00.13 ksoftirqd/0

what is meaning of www-data:www-data

security

The files are not world writeable. They are restricted to the owner of the files for writing.

The web server has to be run under a specific user. That user must exist.

If it were run under root, then all the files would have to be accessible by root and the user would need to be root to access the files. With root being the owner, a compromised web server would have access to your entire system. By specifying a specific ID a compromised web server would only have full access to its files and not the entire server.

If you decide to run it under a different user ID, then that user would need to be the effective owner of the files for proper privileges. It could be confusing to have personal ownership of system-wide files to your personal account.

Creating a specific user would make it easier to recognize the files and consistent to recognize which ID to chown to new files and folders added to the site.

The Userid or Name of the owner doesn’t matter. Whatever is chosen or decided upon will have to be configured in the web server configuration files.

By default the configuration of the owner is www-data in the Ubuntu configuration of Apache2. Since that is the default configuration, you conveniently know the ownership needed for your web files. If you change it, you would have to change the files in your site to match.

How do I change permissions for a folder and all of its subfolders and files in one step in Linux?

The other answers are correct, in that chmod -R 755 will set these permissions to all files and subfolders in the tree. But why on earth would you want to? It might make sense for the directories, but why set the execute bit on all the files?

I suspect what you really want to do is set the directories to 755 and either leave the files alone or set them to 644. For this, you can use the find command. For example:

To change all the directories to 755 (drwxr-xr-x):

sudo find /home/ubuntu/public_html -type d -exec chmod 755 {} \;

To change all the files to 644 (-rw-r--r--):

sudo find /home/ubuntu/public_html -type f -exec chmod 644 {} \;

How to Delete a Facebook Pixel from Business Manager

There is no way to delete an existing pixel. However, you can go to “Business Settings” > “Data Sources” > “Pixels” and there remove the connected “Ad Account” this way the pixel won’t show up in your list of pixels when creating ads or custom/lookalike audiences!

Soa Technology

Additionally, don’t forget to remove them from your website as well.

After contacting facebook support, I learned that it is not possible to delete your pixel from your account! This is outrageous indeed and does not make any sense! You can remove them from your site and this would stop data tracking and everything, except for your facebook account would have multiple Pixels that would make it look unorganized.

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

filezilla not showing hidden files

FileZilla

Open the Filezilla FTP program.

  1. From the menu bar at the top of the screen select Server.
  2. Select Force showing hidden files.
  3. In the Remote Site panel on the right, you should now see all of your files including any hidden ones.

WinSCP

Open the WinSCP FTP program.

  1. From the menu bar at the top the screen select Options then Preferences.
  2. Select Panels from the left column.
  3. Tick to Show hidden files.
  4. In the panel on the right showing the remote site, you should now see all files including hidden ones.

That’s it! You now know how to show hidden files in FileZilla and WinSCP.

get key and value from GET in php

For some specific purposes you may want to know the current key of your array without going on a loop. In this case you could do the following:

reset($array);
echo key($array) . ' = ' . current($array);

The following functions are not very well known but can be pretty useful in very specific cases:

key($array);     //Returns current key
reset($array);   //Moves array pointer to first record
current($array); //Returns current value
next($array);    //Moves array pointer to next record and returns its value
prev($array);    //Moves array pointer to previous record and returns its value
end($array);     //Moves array pointer to last record and returns its value

OTHER EXAMPLE :

<?php foreach($array as $text => $url): ?>
    <a href="<?php echo $url; ?>"><?php echo $text; ?></a>
<?php endforeach; ?>


$array = array(
    'SOA' => 'http://soatechnology.net',
    'Delhijurix' => 'http://delhijurix.com'
);

foreach($array as $title => $url){
    echo '<a href="' . $url . '">' . $title . '</a>';
}

how to load otf fonts in html faster

Put Fonts on CDN

The .htaccess or httpd.conf Code

The code can be placed with the .htaccess file or httpd.conf file:

# Apache config
<FilesMatch ".(eot|ttf|otf|woff)">
	Header set Access-Control-Allow-Origin "*"
</FilesMatch>

# nginx config
if ($filename ~* ^.*?\.(eot)|(ttf)|(woff)$){
	add_header Access-Control-Allow-Origin *;
}

Use Non-Blocking CSS Loading

<link rel="stylesheet" type="text/css" href="fonts.css" media="none" onload="this.media='all';">
<link rel="stylesheet" type="text/css" href="style.css" media="none" onload="this.media='all';">

Essentially using media=none let’s the browser download the stylesheet without blocking rendering, so when the stylesheet has loaded, setting the media to its desired setting will then render the screen as it should. 

Separate Font Selectors

h1 { font-family: Arial, serif; } /* basic system font */
.fontsloaded h1 { font-family:  'MySpecialFont', serif; } /* custom system font */

<link href="fonts.css" onload="document.body.className+=' fontsloaded';" rel="stylesheet" type="text/css" >

Storing Fonts in localStorage

var md5 = 'e90ba95faca6e63b5516ed839f4514ec',
    key = 'fonts',
    cache;

function insertFont(value) {
  var style = document.createElement('style');
  style.innerHTML = value;
  document.head.appendChild(style);
}

// PRE-RENDER
try {
  cache = window.localStorage.getItem(key);
  if (cache) {
    cache = JSON.parse(cache);
    if (cache.md5 == md5) {
      insertFont(cache.value);
    } else {
      // Busting cache when md5 doesn't match
      window.localStorage.removeItem(key);
      cache = null;
    }
  }
} catch(e) {
  // Most likely LocalStorage disabled
  return
}

// POST-RENDER
if (!cache) {
  // Fonts not in LocalStorage or md5 did not match
  window.addEventListener('load', function() {
    var request = new XMLHttpRequest(),
        response;
    request.open('GET', '/path/to/fonts.json', true);
    request.onload = function() {
      if (this.status == 200) {
        try {
          response = JSON.parse(this.response);
          insertFont(response.value);
          window.localStorage.setItem(key, this.response);
        } catch(e) {
          // LocalStorage is probably full
        }
      }
    };
    request.send();
  });
}