Category:

Redirect HTTP to HTTPS in Cakephp3

If you are building CakePHP application and want to move all traffic to HTTPS you can follow bellow simple steps without making any change in .htaccess  file Step 1. Edit AppController to make change use Cake\Event\Event; Step 2. Load security component public function initialize() { parent::initialize(); $this->loadComponent(‘Security’, [‘blackHoleCallback’ => ‘forceSSL’]); $this->loadComponent(‘RequestHandler’); $this->loadComponent(‘Flash’); $this->loadComponent(‘Cookie’); } Step […]

Continue Reading
Posted On :
Category:

PHP function to generate Slug

Here is simple function to generate slug in php. You can copy paste this function and generate slug by passing string in it. function slugify($text){ // replace non letter or digits by – $text = preg_replace(‘~[^\pL\d]+~u’, ‘-‘, $text); // transliterate $text = iconv(‘utf-8’, ‘us-ascii//TRANSLIT’, $text); // remove unwanted characters $text = preg_replace(‘~[^-\w]+~’, ”, $text); // […]

Continue Reading
Posted On :
Category:

Increase Android Studio Speed

Some time while we creating project in android studio the main issue we faced is speed and performance. So here is solution which i use to solve this issue. For Ubuntu Users Go to location where you install your android studio eg. /home/jgd/Drive/work/software/android-studio/bin Now open terminal on same location by right click and in terminal write […]

Continue Reading
Posted On :
Category:

Share multiple photos whatsapp android

Last updated on August 1st, 2019 at 05:03 pmIn this post I explain to you how to send multiple images on WhatsApp from your android application using simple intent. ArrayList imageUriArray = new ArrayList(); imageUriArray.add(Uri.fromFile(imageFile)); imageUriArray.add(Uri.fromFile(imageFile)); Intent intent = new Intent(); intent.setAction(Intent.ACTION_SEND_MULTIPLE); intent.putExtra(Intent.EXTRA_TEXT, “https://www.trinitytuts.com”); intent.setType(“text/plain”); intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, imageUriArray); intent.setType(“image/jpeg”); intent.setPackage(“com.whatsapp”); startActivity(intent); Above code is very easy […]

Continue Reading
Posted On :
Category:

Send email in cakephp 3

If you are working with cakephp 3 and need to send email then this tip help you to send email. Step 1. Go to your app.php and find EmailTransport and add your SMTP details ‘EmailTransport’ => [ ‘default’ => [ ‘className’ => ‘Mail’, // The following keys are used in SMTP transports ‘host’ => ‘My_HOST’, ‘port’ => […]

Continue Reading
Posted On :
Category:

Unistall software in linux using Command line

In this tips i will explain you how to remove software in linux using CMD (Command line). Follow simple steps. Step 1. Open terminal from menu or press ctrl+alt+t. Step 2. Enter command to get list of installed software. dpkg –list Step 3. Now run command to remove software sudo apt-get –purge remove your_application_name when you […]

Continue Reading
Posted On :
Category:

Setup vsftpd on your Ubuntu server

Last updated on October 10th, 2016 at 11:49 amIn this tip i will explain you how to setup FTP server on your.  Follow simple steps to configure FTP on server. Step 1. First install vsftpd on your server sudo apt-get install vsftpd Step 2. Now open and edit vsftpd.conf and change some setting in it anonymous_enable=NO […]

Continue Reading
Posted On :