Thursday, 26 November 2015

How to send e-mail with a simple Python program?
Shreyas Iyer02:28 1 comments


Ever wondered how you could send an e-mail to someone without actually opening the mailbox in your browser, or opening its desktop client? Don't want to go through the tedious process of entering the username and then password? Well, here's a tiny bit of Python code which you can use to send an email to someone. All you need to do is run the program, and that's it!


  Now, the code for the e-mail client goes as follows ...


import smtplib
sender = 'YOUR EMAIL HERE'
receivers = ['RECEIVERS EMAIL HERE']
message = """From: From Person
To: To Person
Subject: Something ...
Huraah! It work's!
"""
try:
  smtpObj = smtplib.SMTP('HOST'S SMTP SERVER ADDRESS HERE')
  smtpObj.sendmail(sender, receivers, message)
  print "Successfully sent email"
except SMTPException:
  print "Error: unable to send email"


Now, SMTP is basically a module in Python, which consists of lots of networking-related functions, and hence we import that in our program. When we are creating smtpObj object, we have to provide the SMTP server address of the host, be it Gmail or Outlook. Here, if you are sending the mail from your gmail account, you need to write 'smtp.gmail.com' in HOST's SERVER ADDRESS, and 'smtp-mail.outlook.com', when sending through your Outlook ID. As simple as that!

NOTE: Information cited from www.tutorialspoint.com.

 For further explanation on this topic, please refer this

How to download a file directly from Google?
Shreyas Iyer00:39 0 comments


You must be a facing a really hard time when you want to download some file from some website. To do that, obviously you Google up the file's name, and then goto some website. But, 80% of websites actually contain lots of ads which pop up when you click 'Download', isnt it? Well, that is frustrating. You resolve to torrents, but that's a tedious process. But now, there's a trick with which you can get direct download links to the file you wish to download! Yes, right there in Google! So, follow along ..


 Here's a code you can use to directly get access to the archive of the website where the file you wish to download is stored.


“YOUR FILE NAME HERE” -inurl:(htm|html|php|pls|txt) intitle:index.of “last modified” (mkv|mp4|avi|mp3|wav|mov|nes|rar|exe|iso|flv|m4a)

In place of (mkv | mp4 |...), you must specify the extension of the file-name you wish to download, like (exe) or (rar) or (mp3), like that. Suppose, I want to download Avicii's Wake Me Up, I simple write ..

“Avicii Wake Me Up” -inurl:(htm|html|php|pls|txt) intitle:index.of “last modified” (mp3)
Similarily, when you want to download a .NES rom of Super Mario Bros. ..

"Super Mario Bros.” -inurl:(htm|html|php|pls|txt) intitle:index.of “last modified” (nes)

Wednesday, 25 November 2015

How to get AdSense for your YouTube channel?
Shreyas Iyer20:26 2 comments

  Every YouTuber and a blogger's goal is to earn his daily bread from the hard work he/she puts in the making of videos, or posts. So, to cater to their goals, Google provides a way from which they can actually earn out of their content, called "AdSense". As the name suggests, AdSense basically involves displaying the ads on your video or your blog, and whenever a visitor clicks on the ads, you get some commission.



  Actually, Ads are the largest source of income nowadays, and firms are heavily investing in advertising themselves. So if you feel that your content is top-notch, and your channel is attracting lots of visitors, then there are high chances that you might earn a lot!




  So, finally decided to go ahead and do it? Alright, here's how I got my YouTube channel AdSense approved in just 2 hours :


  • First of all, in your channel's settings, goto 'Monetize', and from there, click on 'Enable'. This will monetize your channel. 
  • Now, to actually get the ads, you need to create an AdSense account. You have to link your YouTube account with your AdSense account.
  • After that is done, you have to fill up a form on AdSense, and provide the proper details about your address, name, etc.
  • Now, just wait.
Note that, your channel needs atleast 2 or more videos, which are original (i.e created by you), without any copyright issues, or terms of use issues. If all the steps are followed properly, there are high chances that your account will be monetized.

PewDiePie, is the worlds highest earning YouTuber, earning about $7.4 million annually, all because of AdSense. So, definitely sky's the limit!

Make sure that you dont cheat the eco-system. Never click on your own ads, this might lead to your account's termination.

How to make an app using HTML, CSS and JavaScript?
Shreyas Iyer12:17 0 comments

App development has reached its pinnacle. Developers are being paid handsomely for their products, and so more people wish to make app development as their career choice. But, for developers just starting out, learning the basic syntax can take a whole lot of time, and also it may seem to be boring. For example, for Android development, a developer has to have mastery over Java programming, and XML programming, whereas for iOS programming, a developer needs to be fluent in Swift programming and Objective-C programming.

    So, clearly it will take about a year for a developer to be able to make a decent app. Same applies to web developers. They have been finding it too difficult to learn basics of Java, or Swift and so on. But your end waits here!


  If you are fluent enough in HTML, CSS and JavaScript, you can now build a complete app, without even touching Java, or Swift! Yeah, that's right! Adobe Cordova, or earlier know as PhoneGap allows a web developer to port his web site in form of an application package.



  That's not it! Now you need not worry about re-writing your code to support other platforms. PhoneGap does it for you. Make one code, and deploy it on all the platforms.



  When thinking about some famous application made using this tool, the first thing that comes to mind is Evernote! So, now its your time to shine!