Wednesday, April 27, 2016

Maildrop: avoid Spam emails

mail, maildrop, e-mail, spam, disposable email address, free email address
Get free, disposable email address 
 
When you visit a website and it insists that you enter your email address first, before proceeding, what is your reaction? For a large number of people, there is a feeling of unease and distrust and they may just move away. Email, a very effective way of communication, is today plagued by spams and unwanted mails which waste a lot of your time. Hence, we are scared to give our email ID to an unknown site.
 
At such times, just head to maildrop.cc. It helps you with a free, disposable email address. There are no sign-ins, no passwords to remember, no security and no privacy. It just gives you a valid email address which you can enter without fear of spam. Use that address on any site and visit maildrop.cc to receive replies. If you get too much spam there, create another maildrop address and move on!
 
The next time a web form or app asks you to ‘please enter your e-mail address’, you’ll be ready. No problem, it’s “whatever@maildrop.cc” When that site sells your e-mail address, you can shrug, move on to another disposable MailDrop address, and your real e-mail won’t get filled with junk mail. Just try it! www.maildrop.cc

-ref: http://www.moneylife.in/article/maildrop-mail-but-no-spam/46513.html

Android mobile (enable encryption)

Also, almost every Android-based handset has an encryption feature, but not many know or use it.

How to Enable Encryption in Android

Before you get started, there are a few things worth noting:
  • Encrypting the device can take an hour or longer.
  • Your device’s battery must be at least 80% charged. Android won’t even start the process otherwise.
  • Your device must be plugged in throughout the entire process.
  • Again, if you’re rooted, be sure to unroot your phone before continuing!
Basically, make sure you’ve got plenty of time and battery before you start the process. If you interfere with the process or end it before it’s finished, you will likely lose all your data. Once the process is started, it’s best to just leave the device alone and let it do its thing.
With all the caveats out of the way, you’re ready to encrypt your device.
Start by heading into the Settings menu and tapping on “Security,” again keeping in mind that the wording may be slightly different. If your device is already encrypted, it will show up here. Some devices will also allow SD card contents to be encrypted, but by default Android just encrypts on-board storage.
If the device isn’t encrypted, you can start the process by tapping the “Encrypt phone” option.
Screenshot_2016-03-29-12-18-12
The next screen will present a warning to let you know what to expect once the process is finished, most of which we’ve already talked about in this article. If you’re ready to proceed, hit the “Encrypt phone” button.
Screenshot_20160328-143703
One more warning will present itself (seriously, they want to make sure you know what’s happening here), which tells you not to interrupt the process. If you’re still not scared away, one more tap of the “Encrypt phone” button will do the trick.
Screenshot_20160328-144725
The phone will then reboot and start the encryption process. A progress bar and estimated time till completion will show up, which should at least provide an idea of how long you’ll be without your beloved handset. Just wait, it’ll all be okay soon. You can do this. You’re strong.
IMG_8096
Once it’s finished, the phone will reboot and you’re back in business. If you set up a lock screen password, PIN, or pattern, you’ll have to put it in now so the device will finish the boot process.
If you haven’t set up a PIN or password, now is a good time to do so. Head into your device’s Settings > Security menu. From there, select the “Screen Lock” option (keep in mind that the wording may be slightly different for non-stock Android handsets, like Samsung Galaxy devices).
Screenshot_20160329-121558
Choose Pattern, PIN, or Password to set your security.
Screenshot_20160329-121603-576x1024
You’ll be asked if you want to require the PIN, password, or pattern at startup. This is up to you, but we recommend choosing yes, since this increases the security of your device.
screenshot_20160329-140228_1024
Note that even with a fingerprint reader, you can’t use a fingerprint to unlock a device on first boot—you’ll have to put in the password, PIN, or pattern. After the device has been decrypted with the correct security unlocking method, the fingerprint reader can be used to unlock the screen moving forward.
From now on, your device will be encrypted, but if you ever want to disable it, you can do so by performing a factory reset. If you have a newer device that has encryption enabled out of the box, there’s no way to remove said encryption—not even with a factory reset.


Thursday, March 3, 2016

ASX Caltex Share Buy back $270 million. Shall you tender your shares ?

The way the buy back is going to happen for Caltex [As show in the image bellow from ref]. It does not make sense for retail investor.

Caltex is going to take the volume weighted average price of 5 days[4th to 8th April] on asx. Then that will be kept as the base buy back price, and they expect the investor to give them shares at a discount !! Rubbish..

Caltex is providing institutional invest to exit, for small investor it’s no brainer. ( you can sell your share in market at $36 and company want to buy back from you at 30, what ! why would you not go to market and sell)

There is usually premium, if company want to do buy back, which is good as you get premium to market price. 

Except big guys who can’t exit ( if one have 10 million share, and if he try selling, the stock price would crash), thus this is good opportunity for them.. that's it.


Saturday, July 25, 2015

Solution : Google Authenticator continuously crashes



This happened to me when i moved from one phone to other. on investigation i understood that google only allows one authentication device. as on the old phone this setup was already done, The only easy option is to move the authentication to a different phone.

Following is the few step process that worked for me.

  1. Open Authenticator but do NOT press the “Begin setup” button.
  2. Instead, select “setup account” from the option menu.
  3. Then from another device/computer, go to https://accounts.google.com/b/0/SmsAuthSettings, select “Move to a different phone” and scan the QR code.

Friday, July 17, 2015

Linux server filesystem go read-only


First check how the system believes / is supposed to be mounted:

 

        mount|grep -i " / "


Should look something like this:


        /dev/mapper/VolGroup000-LogVol00 on / type ext3 (rw)

 

Might also be worth running a "cat /etc/fstab" and take a look to make sure there isn't a read-only option set in field four of the / entry.

 

If it is supposed to be (rw), then this should work:

 

        mount -o remount /

 

If it is being intentionally mounted (ro), then try this:

 

        mount -o remount,rw /

 


If that appears to work, make sure it survives a reboot (after checking fstab again).

 

 

Failing that, reboot in single user mode and run fsck on the disk in question to check and repair the Linux file system.  Invoke fsck without parameters and it should check everything listed in /etc/fstab.


 

        fsck

 

 

 

Thursday, February 26, 2015

cmake configure_file not replacing variables

most probably you may have

configure_file( in
                        out                       
                       @only )

here @only tells the cmake to only replace the variable defined like @variable@ and not to replace ${variable}

How To Set Up MySQL Master-Master Replication


MySQL replication is the process by which a single data set, stored in a MySQL database, will be live-copied to a second server. This configuration, called "master-slave" replication, is a typical setup. Our setup will be better than that, because master-master replication allows data to be copied from either server to the other one. This subtle but important difference allows us to perform mysql read or writes from either server. This configuration adds redundancy and increases efficiency when dealing with accessing the data.

The examples in this article will be based on two VPS, named Server C and Server D.

Server C: 3.3.3.3
Server D: 4.4.4.4

Step 1 - Install and Configure MySQL on Server C

The first thing we need to do is to install the mysql-server and mysql-client packages on our server. We can do that by typing the following:
sudo apt-get install mysql-server mysql-client
By default, the mysql process will only accept connections on localhost (127.0.0.1). To change this default behavior and change a few other settings necessary for replication to work properly, we need to edit /etc/mysql/my.cnf on Server C. There are four lines that we need to change, which are currently set to the following:
#server-id              = 1
#log_bin                = /var/log/mysql/mysql-bin.log
#binlog_do_db           = include_database_name
bind-address            = 127.0.0.1
The first of those lines is to uniquely identify our particular server, in our replication configuration. We need to uncomment that line, by removing the "#" before it. The second line indicates the file in which changes to any mysql database or table will be logged.
The third line indicates which databases we want to replicate between our servers. You can add as many databases to this line as you'd like. The article will use a single database named "example" for the purposes of simplicity. And the last line tells our server to accept connections from the internet (by not listening on 127.0.0.1).
server-id               = 1
log_bin                 = /var/log/mysql/mysql-bin.log
binlog_do_db            = example
# bind-address            = 127.0.0.1
Now we need to restart mysql:
sudo service mysql restart
We next need to change some command-line settings within our mysql instance. Back at our shell, we can get to our root mysql user by typing the following:
mysql -u root -p 
Please note that the password this command will prompt you for is that of the root mysql user, not the root user on our droplet. To confirm that you are logged in to the mysql shell, the prompt should look like the following.
mysql> 
Once we are logged in, we need to run a few commands.
We need to create a pseudo-user that will be used for replicating data between our two VPS. The examples in this article will assume that you name this user "replicator". Replace "password" with the password you wish to use for replication.
create user 'replicator'@'%' identified by 'password'; 
Next, we need to give this user permissions to replicate our mysql data:
grant replication slave on *.* to 'replicator'@'%'; 
Permissions for replication cannot, unfortunately, be given on a per-database basis. Our user will only replicate the database(s) that we instruct it to in our config file.
For the final step of the initial Server C configuration, we need to get some information about the current MySQL instance which we will later provide to Server D.
The following command will output a few pieces of important information, which we will need to make note of:
show master status; 
The output will looking similiar to the following, and will have two pieces of critical information:
+------------------+----------+--------------+------------------+
| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000001 |      107 | example      |                  |
+------------------+----------+--------------+------------------+
1 row in set (0.00 sec)
We need to make a note of the file and position which will be used in the next step.

Step 2 - Install and Configure MySQL on Server D

We need to repeat the same steps that we followed on Server C. First we need to install it, which we can do with the following command:
sudo apt-get install mysql-server mysql-client
Once the two packages are properly installed, we need to configure it in much the same way as we configured Server C. We will start by editing the /etc/mysql/my.cnf file.
sudo nano /etc/mysql/my.cnf 
We need to change the same four lines in the configuration file as we changed earlier.
The defaults are listed below, followed by the changes we need to make.
#server-id              = 1
#log_bin                = /var/log/mysql/mysql-bin.log
#binlog_do_db           = include_database_name
bind-address            = 127.0.0.1
We need to change these four lines to match the lines below. Please note, that unlike Server C, the server-id for Server D cannot be set to 1.
server-id              = 2
log_bin                = /var/log/mysql/mysql-bin.log
binlog_do_db           = example
# bind-address            = 127.0.0.1
After you save and quit that file, you need to restart mysql:
sudo service mysql restart
It is time to go into the mysql shell and set some more configuration options.
mysql -u root -p 
First, just as on Server C, we are going to create the pseudo-user which will be responsible for the replication. Replace "password" with the password you wish to use.
create user 'replicator'@'%' identified by 'password'; 
Next, we need to create the database that we are going to replicate across our VPS.
create database example; 
And we need to give our newly created 'replication' user permissions to replicate it.
grant replication slave on *.* to 'replicator'@'%'; 
The next step involves taking the information that we took a note of earlier and applying it to our mysql instance. This will allow replication to begin. The following should be typed at the mysql shell:
slave stop; 
CHANGE MASTER TO MASTER_HOST = '3.3.3.3', MASTER_USER = 'replicator', MASTER_PASSWORD = 'password', MASTER_LOG_FILE = 'mysql-bin.000001', MASTER_LOG_POS = 107; 
slave start; 
You need to replace 'password' with the password that you have chosen for replication. Your values for MASTER_LOG_FILE and MASTER_LOG_POS may differ than those above. You should copy the values that "SHOW MASTER STATUS" returns on Server C.
The last thing we have to do before we complete the mysql master-master replication is to make note of the master log file and position to use to replicate in the other direction (from Server D to Server C).
We can do that by typing the following:
SHOW MASTER STATUS; 
The output will look similiar to the following:
+------------------+----------+--------------+------------------+
| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000004 |      107 | example      |                  |
+------------------+----------+--------------+------------------+
1 row in set (0.00 sec)
Take note of the file and position, as we will have to enter those on server C, to complete the two-way replication.
The next step will explain how to do that.

Step 3 - Completing Replication on Server C

Back on Server C, we need to finish configuring replication on the command line. Running this command will replicate all data from Server D.
 
slave stop; 
CHANGE MASTER TO MASTER_HOST = '4.4.4.4', MASTER_USER = 'replicator', MASTER_PASSWORD = 'password', MASTER_LOG_FILE = 'mysql-bin.000004', MASTER_LOG_POS = 107; 
slave start; 
Keep in mind that your values may differ from those above. Please also replace the value of MASTER_PASSWORD with the password you created when setting up the replication user.
The output will look similiar to the following:
Query OK, 0 rows affected (0.01 sec)
The last thing to do is to test that replication is working on both VPS. The last step will explain an easy way to test this configuration.

Step 4 - Testing Master-Master Replication

Now that have all the configuration set up, we are going to test it now. To do this, we are going to create a table in our example database on Server C and check on Server D to see if it shows up. Then, we are going to delete it from Server D and make sure it's no longer showing up on Server C.
We now need to create the database that will be replicated between the servers. We can do that by typing the following at the mysql shell:
create database example; 
Once that's done, let's create a dummy table on Server C:
create table example.dummy (`id` varchar(10)); 
We now are going to check Server D to see if our table exists.
 
show tables in example; 
We should see output similiar to the following:
+-------------------+
| Tables_in_example |
+-------------------+
| dummy             |
+-------------------+
1 row in set (0.00 sec)
The last test to do is to delete our dummy table from Server D. It should also be deleted from Server C.
We can do this by entering the following on Server D:
DROP TABLE dummy; 
To confirm this, running the "show tables" command on Server C will show no tables:
Empty set (0.00 sec)
And there you have it! Working mysql master-master replication.

Ref: https://www.digitalocean.com/community/tutorials/how-to-set-up-mysql-master-master-replication

Test remote SQL connectivity without SQL tools

Have you ever been troubleshooting a problem with remote SQL Iproxy MP, remote DB, etc) and wanted to test to see if the local system account (or any account for that matter) could make a remote connection to SQL but you didn’t want to install the SQL tools just to make that test?  Seems there is a file type – UDL file – that you can simply create that will bring up a window to allow testing of remote connections to SQL.

Just go anywhere on your system and create an empty text file named anything but instead of txt make sure the extension is UDL.  Then, double-click on the file and up pops a SQL connectivity window to allow testing of remote SQL connections.

clip_image002
Very easy to use to test connectivity with a known user account or as local system using PSExec.

Thursday, February 19, 2015

ssh-copy-id in Mac OS X

For some reason Macs don’t have this useful script so this will add it.

sudo curl "http://phildawson.co.uk/ssh-copy-id" -o /usr/bin/ssh-copy-id
sudo chmod +x /usr/bin/ssh-copy-id

fix: /usr/bin/ssh-copy-id: ERROR: No identities found

Issue:

patelm@patelm-l ~
$ ssh-copy-id  patelm@10.22.56.146
/usr/bin/ssh-copy-id: ERROR: No identities found

the main issue is that the identity is no added

Check:

patelm@patelm-l ~
$ ssh-add.exe
Could not open a connection to your authentication agent.


Solution:

patelm@patelm-l ~
$ eval `ssh-agent`
Agent pid 8572

patelm@patelm-l ~
$ ssh-add.exe
Identity added: /home/patelm/.ssh/id_rsa (/home/patelm/.ssh/id_rsa)


Now you shall be able to


patelm@patelm-l ~
$ ssh-copy-id  patelm@10.22.56.146
Password:
Now try logging into the machine, with "ssh 'patelm@10.22.56.146'", and check in:
  ~/.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.

your password less login shall work !