How to schedule commands in Linux

Any linux commands can be scheduled using `at` command.

> at <time>

warning: commands will be executed using /bin/sh
at> <command> ctrl+D


at 05:00
at> reboot 
at> <EOT>
job 5 at Sun Dec  08 05:00:00 2013

Tags: Linux

Lizard Has One-Way Breathing Hints at How Dinosaurs Breathed

Air flows only one way through its lungs—other than the American alligator, it’s the only other known reptile found to have this trait.

That’s surprising, because the unidirectional airflow of birds was thought to have evolved due to the high-oxygen demands of flight: Instead of being partially filled with stale, depleted air like human lungs, avian lungs contain air with a much higher average oxygen content and are much more efficient at getting oxygen to the blood.

So this method of breathing was generally considered to be unique to both warm-blooded animals and birds.

That changed in 2010, when Colleen Farmer of the University of Utah and colleagues found that alligators breathe one way.

Now, Emma Schachner, a postdoctoral researcher in Farmer’s lab, has added another species to that list.

“Finding this trait in a [cold-blooded] lizard means that warm-bloodedness and unidirectional airflow have no relationship whatsoever,” Schachner said.

As I Live and Breathe

When humans or other mammals breathe, the air flows through the same lung passages during both an inhale and an exhale. As we inhale, the air flows in through our nose and mouth and down through the windpipe, where it splits and flows into a bronchi, or passageway, that leads to each lung.

The airways divide and divide again, each time getting smaller and smaller. Eventually, the air makes it to tiny alveolar sacs, where oxygen travels from the air into the bloodstream.

courtesy: NGC

Tags: Ngc, Lizard

cmake prefix equivalent to configure

How to mention prefix path for "cmake" same as ./configure --prefix=/home/dir1

cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/dir1 . && make all install

This command will set the prefix path (install destionation) for build source, same as configure command.

Tags: Cmake, Prefix, Configure

Milk and Brazil nuts will send you off to sleep

Scientists concludes certain minerals and acids are linked to a sound slumber.

Searching for the recipe for a good night’s sleep? It could be as simple as a glass of milk and a few handfuls of nuts.

Scientists in the US studied the diets and sleep patterns of more than 4,500 adults and concluded that certain minerals and acids are linked to a sound slumber.

Milk & Nuts

And their report suggests that a late-night snack of Brazil nuts – which are packed with selenium and potassium – washed down with a calcium-rich glass of milk contains all the ingredients you need for a satisfying sleep.

Lead author Dr Michael Grandner of Pennsylvania University, said: 'These findings suggest potentially natural and common-sense solutions to sleep problems.

'Although there is still important work that needs to be done on cause-and-effect, there is a lot of research showing that non-medication approaches can be very helpful.

'Even sleep disorders such as sleep apnea and insomnia can be very effectively treated.

'The importance of diet is often overlooked when dealing with these sorts of problems.

'Diet, sleep, physical activity, and other parts of a healthy lifestyle have an impact on many systems in the body and, ultimately, play a role in how we think, feel, and act.'

Researchers quizzed 4,548 adults on their health, diet, lifestyle and sleep.

Women on the lowest incomes were most prone to having difficulty in getting a good night’s rest.

But even taking into account age, sex, education, salary, weight an mental health, several elements of food were seen to be significantly linked to satisfying sleep patterns.

Odds of having trouble dropping off were reduced by 20 per cent where dietary intake of the mineral selenium was doubled and by 17 per cent for calcium.

Greater consumption of carbohydrate, butanoic and dodecanoic acids – both abundant in milk – and vitamin D were linked with experiencing unbroken slumber.

Meanwhile, the chances of suffering lingering lethargy or tiredness the following day were cut by 30 per cent where there was twice as much potassium in the diet and 19 per cent for additional calcium.

Poor sleep was associated with two fats commonly found in butter and cheese – hexanoic and hexadecanoic acid – and also salt and drinking lots of fluids.

Every year, between 30 and 40 per cent of British adults suffer from insomnia with ten per cent regularly dogged by the condition.

Doctors are increasingly moving away from prescribing expensive drugs to alleviate symptoms, instead looking for therapeutic methods to treat the root causes.

Tags: Sleep, Nuts

8 Health Benefits of Drinking Wine

Benefits of Drinking Wine

The Benefit: Promotes Longevity

The Evidence: Wine drinkers have a 34 percent lower mortality rate than beer or spirits drinkers. Source: a Finnish study of 2,468 men over a 29-year period, published in the Journals of Gerontology, 2007.

The Benefit: Reduces Heart-Attack Risk

The Evidence: Moderate drinkers suffering from high blood pressure are 30 percent less likely to have a heart attack than nondrinkers. Source: a 16-year Harvard School of Public Health study of 11,711 men, published in the Annals of Internal Medicine, 2007.

The Benefit: Lowers Risk of Heart Disease

The Evidence: Red-wine tannins contain procyanidins, which protect against heart disease. Wines from Sardinia and southwest France have more procyanidins than other wines. Source: a study at Queen Mary University in London, published in Nature, 2006.

The Benefit: Reduces Risk of Type 2 Diabetes

The Evidence: Moderate drinkers have 30 percent less risk than nondrinkers of developing type 2 diabetes. Source: research on 369,862 individuals studied over an average of 12 years each, at Amsterdam's VU University Medical Center, published in Diabetes Care, 2005.

The Benefit: Lowers Risk of Stroke

The Evidence: The possibility of suffering a blood clot–related stroke drops by about 50 percent in people who consume moderate amounts of alcohol. Source: a Columbia University study of 3,176 individuals over an eight-year period, published in Stroke, 2006.

The Benefit: Cuts Risk of Cataracts

The Evidence: Moderate drinkers are 32 percent less likely to get cataracts than nondrinkers; those who consume wine are 43 percent less likely to develop cataracts than those drinking mainly beer. Source: a study of 1,379 individuals in Iceland, published in Nature, 2003.

The Benefit: Cuts Risk of Colon Cancer

The Evidence: Moderate consumption of wine (especially red) cuts the risk of colon cancer by 45 percent. Source: a Stony Brook University study of 2,291 individuals over a four-year period, published in the American Journal of Gastroenterology, 2005.

The Benefit: Slows Brain Decline

The Evidence: Brain function declines at a markedly faster rate in nondrinkers than in moderate drinkers. Source: a Columbia University study of 1,416 people, published in Neuroepidemiology, 2006.

Tags: Wine, Health, Memory

Mars Mission Mangalyaan India comes last but still defeats the toppers - US, Russia, Europe

angalore, Sept 24: India's mission Mars -- Mangalyaan entered the Mars orbit, the latest entrant. It created history on Wednesday, Sept 24. The fact, which shocked many, is that Mangalyaan is the cheapest mission for Mars so far. Mangalyaan, which means "Mars craft" in Hindi, took off from the island of Shriharikota, off India's eastern coast, 10 months ago. The 3,000lb (1,350kg) device first headed for an elliptical orbit around Earth, after which a series of manoeuvres and short burns of its rocket engines sent it on towards Mars. India defeated US, Russia, Europe, the other countries which had already placed their satellite on Mars orbit. While big Asian giants -- China, Japan failed to join them, India joined the elite club of Martian explorers with United States, European Space Agency and former Soviet Union. 

Here are the comparative costs of travel to the red planet in recent years:

NASA's Maven USA Nov 18, 2013 Sept 21, 2014  -- $671million

Mars Express Orbitor Europe June 2003 December 2003 --- $386 million

Nozomi Japan July 1998 Mission failed, Dec 2003 --- $189 million

Phobos-Grunt With Chinese satellite Russia Nov 2011 Mission failed --- $117 million

Mangalyaan India Nov 5, 2013 Sept 24, 2014  --- $74 million

Tags: Mars, Mission, Mangalyaan, India

WhatsApp available on Web

To connect your web browser to your WhatsApp client, simply open in your Google Chrome browser. You will see a QR code --- scan the code inside of WhatsApp, and you’re ready to go.

You have now paired WhatsApp on your phone with the WhatsApp web client. Your phone needs to stay connected to the internet for our web client to work, and please make sure to install the latest version of WhatsApp on your phone. Unfortunately for now, we will not be able to provide web client to our iOS users due to Apple platform limitations.

We really hope you find web client useful in your everyday lives.

Tags: Whatsapp, Web, Mobile

Tomorrow Time Stops for a Second

Why Time Will Stop For a Leap Second

Time will stop on June 30, but don't worry: It will only be for a second. Researchers will add a sliver of time—a leap second—to the world's clocks.

Just as leap years keep our calendars lined up with Earth's revolution around the sun, leap seconds adjust for Earth's rotation. This kind of fine-tuning wasn't much of an issue before the invention of atomic clocks, whose ticks are defined by the cycling of atoms. Cesium-based clocks, one kind of atomic clock, measure the passage of time much more precisely than those based on the rotation of our planet, so adding a leap second allows astronomical time to catch up to atomic time.

Atomic Clock

An atomic clock based on cesium ticks away at the German National Metrology Institute in northern Germany.

Most of us won't notice the addition, which happens at 23:59:59 coordinated universal time (UTC), or 7:59 p.m. ET, unless we deal in timescales shorter than a second, or if we use a computer program that crashes because it can't handle the leap second. It's happened before: The 2012 leap second brought down Reddit, Gawker Media, and Mozilla.

"It's a major interruption mostly because there are a lot of systems that aren't prepared to handle the leap second correctly," says Judah Levine, a physicist at the National Institute of Standards and Technology (NIST) in Boulder, Colorado. Leap seconds occur irregularly, which makes it hard for programmers to test their fixes, he explains.

Levine is responsible for making sure the nation's timekeepers at NIST can handle the leap second. When it comes time to adjust their clock, NIST will transmit 23:59:59 UTC twice, Levine says. "Once when that time arrives, and once again for the leap second."

So 6 p.m. mountain time—the NIST offices in Colorado are seven hours behind UTC—on June 30 will be stressful. "There's a full panic mode just before and after 6 p.m.," he says.

Even if all goes well during the addition, Levine and his team are usually greeted the morning after by a deluge of emails concerning various problems.

Not everyone recognizes the leap second, although Apple does so on its devices. Google mobile devices sync with internet time services that are usually tied to atomic clocks. But "if you have a standard Windows system, [it] just ignores the leap second," Levine says.

Financial markets like the New York Stock Exchange also take the leap second into account. The exchange will close the market a half hour earlier than normal, at 7:30 p.m. ET on June 30, to help their systems deal with the addition.

Courtesy: NGC

Tags: Leap Second, Atomic Clock, Earth, Clock

What is DevOps

DevOps is the combination of cultural philosophies, practices, and tools that increases an organization’s ability to deliver applications and services at high velocity: evolving and improving products at a faster pace than organizations using traditional software development and infrastructure management processes. This speed enables organizations to better serve their customers and compete more effectively in the market.

Under a DevOps model, development and operations teams are no longer “siloed.” Sometimes, these two teams are merged into a single team where the engineers work across the entire application lifecycle, from development and test to deployment to operations, and develop a range of skills not limited to a single function. Quality assurance and security teams may also become more tightly integrated with development and operations and throughout the application lifecycle.

These teams use practices to automate processes that historically have been manual and slow. They use a technology stack and tooling which help them operate and evolve applications quickly and reliably. These tools also help engineers independently accomplish tasks (for example, deploying code or provisioning infrastructure) that normally would have required help from other teams, and this further increases a team’s velocity.

Tags: Devops, Continuous Integration, Continuous Deployement

How to connect GitHub from Linux using private key

  1. Login to ternimal 
  2. Create ssh public key using the following command 
    ssh-keygen -t rsa -b 4096 -C ""
    Will ask for id.rsa file number. jus hit enter.
    Next will ask for passphrase, If you need to secure you git repository provide a phrase. Otherwise just hit enter. (remember it, will ask every time when you try to commit and push the code)
  3. ~/.ssh/ file is created in your user home directory.
  4. using vi ~/.ssh/ or gedit ~/.ssh/ edit it and copy the content of the file.
  5. Login in to
  6. Select your repository => "Settings" in top menu.=> Click "Deploy keys"
  7. Input "Title" for your reference, paste the copied key in to "Key" textarea.
  8. It will ask you to confirm you account password.
    Now your are ready to connect to you repository.
  9. Now create a folder and using "git clone" command.

During git push it will ask for passphrase, If you provided during the private key generation.(@Step 2)

Tags: Linux, GitHub, SSH Private Key, GIT

See the Brightest Supermoon of 2017

On the night of December 3 2017, sky-watchers around the world will get a chance to revel under the first—and last—full supermoon of the year.

This December 2017 full moon officially occurs at 9:17 p.m. IST (15:47 UT) on the 3rd. Less than a day later, the lunar orb will make its closest approach to Earth for the month, coming within 222,443 miles of our planet at 3:30 p.m. ET (9:00 UT) on the 4th. That means the moon on the day of December 4 will appear about seven percent larger and 16 percent brighter than usual.

A supermoon is the popular term for a full or new moon that coincides with the lunar orb making an especially close approach to Earth. The moon’s orbit around Earth is not a perfect circle but is somewhat elongated. That means the moon changes its distance to Earth by a few thousand miles over time, reaching a closest point (perigee) and a farthest point (apogee) in any given month.

Technically, this will be the fourth supermoon of the year, but it’s the only one we’ve been able to see with naked eyes. That’s because the other three supermoons of 2017 coincided with new moons, when the lunar disk shows a totally darkened face.

Courtesy: NGC

Tags: SuperMoon, Moon

Linux find which process is using which port

Below commands can be used to find what are the ports currently used and associated process.

$ netstat -ant

Which tells the list of ports currently used by the system

$ lsof -i:8080

Above command lists the process name with details which uses the port 8080. Also shows process id PID and in which user the process is running.

 $ fuser 80/tcp

Also can find the process/service listening on a particular port by running the command below (specify the port).

Tags: Linux, Networking Commands

How to reset root MySQL

If you have forgotten MySQL root password and have root access to linux system follow the below steps.

  • Stop the MySQL server process as root users using command
$ sudo service mysql stop
  • Start MySQL serve rin safe mode with skip grant table command
$ sudo mysqld_safe —skip-grant-tables —skip-networking &
If it throughs any error saying mysqld folder not found. Create the folder
$ sudo mkdir -p /var/run/mysqld
  • login with MySQL server using command, it won't ask for password.
$ mysql -u root -p
  • Once logged in follow below MySQL sql query to change new password
mysql> use mysql;
​mysql> update user set authentication_string=password('NEWPASSWORD') where user='root';
​mysql> flush privileges;
​mysql > quit
  • Now stop MySQL server using kill command
$ killall mysqld_safe
  • Start MySQL server using default service and login with new password.
$ sudo service mysql start  


$ sudo /etc/init.d/mysql start

Also can be reset using temporary file using below steps

  1. Kill/Stop running MySQL server first
$ sudo  kill `cat /mysql-data-directory/`


$ sudo killall mysqld
  1. Create a temporary file (init_mysql.tmp) with following sql with new password in place of "MyNewPassword" in current folder.
    1. For MySQL 5.7.6 and later:
      ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPassword';
    2. For MySQL 5.7.5 and earlier:
      SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');
  2. Start MySQL server using temporary file created in previous step.
$ mysqld --init-file=/home/me/init_mysql.tmp &
  1. After the server has started successfully delete the temporary file /home/me/init_mysql.tmp
  2. Now login in to MySQL server with the pemoprary password give in file and reset using the below SQL commands
mysql> UPDATE mysql.user SET authentication_string = PASSWORD('MyNewPass'), password_expired = 'N'     WHERE User = 'root' AND Host = 'localhost';
  1. Once set restart the MySQL server and all done.

Tags: MySQL, Reset Password

Elon Musk Unveils Falcon Heavy Rocket Photos Ahead of Maiden Flight

SpaceX founder Elon Musk unveiled a tantalizing first glimpse at his company's new megarocket — the Falcon Heavy — which is expected to launch on its maiden flight next month. 

In an early morning Twitter post, Musk revealed several views of the new rocket under assembly inside SpaceX's hangar at Pad 39A of NASA's Kennedy Space Center in Cape Canaveral, Florida. The images show stunning views of the Falcon Heavy from above and one imposing shot of the rocket's 27 first-stage engines, nine on each of its three main boosters.

SpaceX's Falcon Heavy is a heavy-lift launch vehicle powered by two first-stage boosters from the company's Falcon 9 rockets and a central core booster that itself is a modified Falcon 9. The rocket will stand 230 feet (70 meters) tall when complete and is designed to launch payloads of up to 119,000 lbs. (57 metric tons) into space.

The Falcon Heavy is the most powerful U.S. rocket since NASA's Saturn V moon rocket and is capable of launching twice as much payload as the current record-holder, the Delta IV Heavy built by United Launch Alliance. SpaceX's rocket is also designed to be reusable, with the three core boosters built to fly back to Earth and land like SpaceX's current Falcon 9 rockets. The company test-fired the Falcon Heavy's core stage for the first time earlier this year, in May.

Musk has said that Falcon Heavy's first payload will be his own midnight-cherry-red Tesla Roadster, launched on a trajectory aimed for Mars orbit. However, Musk has said that there's a fair chance the rocket could fail on its debut test flight. The Falcon Heavy is expected to perform its first static-fire test on Pad 39A by the end of 2017, SpaceX representatives have said. 

SpaceX also plans to use a Falcon Heavy and Dragon space capsule to launch two passengers around the moon by the end of 2018.


Tags: Elon Musk, SpaceX, Falcon, Rocket, NASA

Eelo New Open Source Mobile OS by Mandrake Linux Creator

eelo is a new mobile OS based on open source Android distribution LineageOS. Its creator is trying to build an ecosystem which is free from Google and Google related products

eelo is a new project launched by Gael Duval, the creator of now defunct but once hugely popular Mandrake Linux (later known as Mandriva Linux). As per Gael, this is an attempt to free us from corporates like Google and Apple invading our privacy and selling our data to advertisers. 

I’m not happy with this situation because iOS is proprietary and I prefer Open Source Software. I’m not happy because Apple is getting crazy with their latest products. They are more and more expensive, and not really exciting.


Also I’m not happy with Google and others. They have become too big and are tracking us by catching a lot of information about what we do. They want to know us as much as possible to sell advertising. Like millions others, I’VE BECOME A PRODUCT OF GOOGLE.


I want to stop that, at least for myself. People are free to do what they want. They can choose to be voluntary slaves. But I do not want this situation for me anymore.


eelo will be more than just a mobile operating system. It will have its own associated web-services such as email, cloud storage, online office tool etc. eelo is intended for people with a better respect for their personal data and privacy. But at the same time, it wants to give the end-user all the tools that a standard mobile OS provides.

eelo is forked from LineageOS, an open source Android distribution. LineageOS can run mainstream applications so it will be used to put together a consistent mobile and web system.

The project is called ‘eelo’ after eel fish because eels are small fishes that can hide in the sea. That’s symbolic of privacy.

Oh! don’t expect it to be 100% perfect from the privacy point of view at least in the beginning but Gael thinks it will be better and better with each iteration.

“We’re 7.6 billion people on Earth and I don’t see a good reason why they would all accept to have their private data cached by Google, Apple and a few others,” says Gaël Duval, the Europe-based project founder of Eelo. However, Duval told that his approach will be realistic and pragmatic, which means he is not going to make Eelo completely isolated from the rest of the ecosystems.

The first level of his privacy-enabled phone would mean “no Google inside”. “Google is absolutely everywhere. Even in Chromium (the open source release of Chrome web browser), there are low-level code that is sending what the user is doing to Google,” he explains, adding that if “you use a Google DNS resolver such, Google is catching some information about your activity on Internet”.

The same with Google Search, Gmail, Google Maps, Google Drive and so on. Similarly, each time to install an application and or even use an app that is using Google services, you are sending some information to them, he adds. “Apple is catching your data (even health data) and using it for their business, and also they have a deal with Google to have their search engine by default for the user.” Duval promises alternative services “that better respect the user privacy”.

Tags: Eelo, Mobile OS, Manadrake Linux, Gaël Duval