Is this safe to clean my hardware from dust?

Compressed air is fine, but that there is likely not compressed air, rather a chemical reaction based system that tends to shoot out liquid that can harm electronics. Consider getting something like http://www.bhphotovideo.com/c/product/259157-REG/Giottos_AA1900_Rocket_Air_Blower.html, it's 100% safe for electronics, and can be used for years at a time (rather than ~45seconds in the case of compressed air). Doubles as a strength training tool too!




NO, ABSOLUTELY NEVER USE A VACUUM CLEANER AROUND ELECTRONICS
 
There is nothing wrong with using a vacuum cleaner as long as the attachments are non-metallic.
You can find some very good plastic attachment kits like the one below...

www.amazon.com/Micro-Vacuum-Attachment-Kit-Piece/dp/B000BSJCLY

 


Wrong, plastic is actually worse. The main reason is that the air friction caused by a vacuum cleaner's operation can build up static electricity, and i have seen people fry their computers (two of them in the last three years alone) by doing that.
http://skeptics.stackexchange.com/questions/18668/is-it-dangerous-to-vacuum-clean-motherboards-and-other-electronics
http://www.globalindustrial.com/c/janitorial-maintenance/floor-care/computer