Socialabel

Saturday, March 18, 2017

Clear Memory di Linux

Pada sistem operasi linux terdapat 3 cara untuk menghapus memori yang digunakan oleh aplikasi
1. Clear PageCache only.
# sync; echo 1 > /proc/sys/vm/drop_caches

2. Clear dentries and inodes.
# sync; echo 2 > /proc/sys/vm/drop_caches

3. Clear PageCache, dentries and inodes.
# sync; echo 3 > /proc/sys/vm/drop_caches

Thursday, March 9, 2017

Python SMTP Client Pada Google

First, you'll want to allow less secure apps to access your account. For detailed instructions on how to do this, you should check out this page:
  1. Go to the "Less secure apps" section in My Account.
  2. Next to "Access for less secure apps," select Turn on. (Note to G Suite users: This setting is hidden if your administrator has locked less secure app account access.)

If you have 2-step verification enabled on your account, then you'll need to create an app-specific password for less secure apps like this. In that case, you'll need to follow the instructions here:
And finally, if you're still getting an SMTPAuthenticationError with an error code of 534, then you'll need to do yet another step for this to work.
I haven't had to do this last step for my own accounts, but I've read that it doesn't actually work right away. Apparently after you enable less secure apps, you may need to wait a few minutes before trying the 'Display Unlock Captcha' link. If you run in to this problem and find a good way around it, please let us know in the comments!