Skip to main content

Posts

How to configure godaddy domain on heroku via cloudflare

Here is how I did it from scratch. Step 1: Setting Up Heroku and Godaddy The first step is adding the GoDaddy domain to the Heroku app. Login to heroku and navigate to the app settings, under domain section click on "Add domain" then type "www.yourdomain.com" & "yourdomain.com". The domain name is the one purchased from GoDaddy. Step 2: Setup cloudflare Go to cloudflare, add a domain you want to point via cloudflare (domain added in  step 1).When you add domain cloudflare will automatically fetch all the sever records and provide you with  NS.Addiotnally point heroku via CNAME/ANAME to heroku app. Step 2: Copy NS from godaddy to cloudflare Log into GoDaddy account and go to your domain detail page.The domains details page will show all the DNS related to the domain name.Copy NS from step 2 (cloudflare) &  paste it in godaddy under custom NS option. That's all.

Sending Emails in Laravel with Gmail SMTP

This post will help you to fix issue like  Error : Swift_TransportException in StreamBuffer . php line 268 : Connection could not be established with host smtp . gmail . com [ Connection refused #111] Sending emails is crucial for any web application. Usually, an email is sent to notify the user of some kind of activity.Here are the steps to send email in laravel using Gmail SMTP. Generally Gmail is not recommended to send emails on live server, but if you just using it for testing purpose then follow these steps: 1. Visit   https://myaccount.google.com/security   make sure you have allowed  less secure app  to YES. 2. Unlock captcha on  https://accounts.google.com/b/0/DisplayUnlockCaptcha . 3. Generate APP password  Turn on 2-Step Verification for your account  https://myaccount.google.com/security. Your app might not support the latest security standards. Try changing a few settings to allow less secure...

Sensitive data in github

What is it? As one is committing the code to github , the developers must be aware that no credentials should be pushed with github .Even the repository is private but still it is not recommended to put your keys/password on github.The following reasons explain the reasons : This is very risky, exposing those credentials on a 3rd-party service that you don't control and manage then you are increasing the risk. There are lots of ways your credentials could be exposed: service compromise, compromised service accounts, authorization failure in the service, network eavesdropping, you granting access to the wrong person, etc.This leads huge risk to your company and it's reputation. How to find the suspected information As there are certain way of keys being exposed in the code statically , but simply search for parameters such as “KEY”,”API KEY”,”Password”,”credentials”,”phpinfo” etc , here we need to identify which files contain these information as static content .most...

How to Upgrade PostgreSQL from 9.6 to 10.0 on Ubuntu 16

A Step-by-Step Guide to upgrade postgresql from 9-6 to 10 on ubuntu 16 1.Make a backup. Make sure that your database is not being updated.   pg_dumpall > outputfile  2. Install Postgres 10.             a) Create the file /etc/apt/sources.list.d/pgdg.list and add a line for the repository                     deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main                       b) Import the repository signing key, and update the package lists                    wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - sudo apt-get update 3. Run sudo apt-get install postgresql-10 . A newer version will be installed side-by-side with the earlier version. 4. Run pg_lsclusters: Ver  Cluster   Port     S...

How to copy data from one ubuntu machine to another

How can I copy folder from one computer to another in ubuntu? If you want to transfer some files from Ubuntu to Windows or Ubuntu to Ubuntu , you can transfer via smba or sftp using below steps : Steps to share from ubuntu To get started, right-click on the folder you wish to share and select ‘Sharing Options’ When prompted to install Samba services, do it. Then click ‘Create Share’ to complete the process. Access it from Windows On the Windows machine, go to Start –> All Programs –> Accessories –> run and type the command: \\computer_name\share_name computer name can be ip address of ubuntu machine , to check ip of ubuntu machine , go to ubuntu machine & open terminal & type ifconfig Type the Ubuntu computer name and the share name of the resource. You will get a prompted to enter your credentials. Type your Ubuntu username and password and click ‘OK’ Access it from ubuntu on same network sftp://192.168.x.x Username = Ubuntu Machine Username from whe...

How to Clear LinkedIn Cache for Link Preview - Clear LinkedIn Cache

While Sharing the url via social fb , twitter , linkedin etc , sometime we face the issue of old version of image/content. This mostly happens with LinkedIn ;) If you share an older post or page it will grab the Open Graph tags to display the image and meta information. The problem is LinkedIn probably has your old tags cached on its system. So you need a way to refresh it. To fix this you simply need to add a query string to the end of the URL. For example, I changed the following: https://svikramjeet.blogspot.in to https://svikramjeet.blogspot.in/?ref=home It doesn’t matter what it is, and in fact the URL above will still work. This will then update the post information as LinkedIn can’t cache query strings. You can in fact then actually remove the query string, leaving your original URL, as LinkedIn will then have the up to date Open Graph tags. You can see below the new information that was now pulled from the same URL. And that’s it! You have now cleared LinkedIn cach...

Buildup Makes Russia Battle-Ready for Ukraine

Buildup Makes Russia Battle-Ready for Ukraine Over 300 Ukrainian troops have crossed into Russia during heavy fighting with pro-Russian separatists. The border area is very tense amid Ukrainian allegations that Russian forces have been helping the separatists with rocket barrages.Russia has announced that it will hold an air force exercise this week near the border. A Russian defence ministry spokesman said 100 aircraft would take part in the operation. Recently near Ukraine border, Russia has nearly doubled the number of its battalions.Over the few past weeks, Russia has built up 17 battalions ,totaling around 21,000 troops, according to one estimate within a few miles of the border. In addition, it has vastly expanded its firepower.President of Russia could be seeking to pressurize ukraine and the United States to agree to a political settlement that would grant the eastern provinces of Ukraine.