Posts

edx-platform - How to make SMTP work on your Open EdX instance the proper way

There were several threads in the Open EdX mailing list asking about how to make the email working. But, it seams like there is no proper instructions out there to help people. So, I decided to write something about that. Firstly, there are 3 simple things to keep in mind: All the authentication information should be kept privately. If you add them to the edx-platform source files there will be conflicts when you upgrade or pull from master/branches. So, the best place to keep all the settings for all your Open edX applications is /edx/app/edx_ansible/server-vars.yml .  0. Checkout all of your modification on: (to avoid source code conflicts) cms/envs/common.py lms/envs/aws.py cms.env.json cms.auth.json lms.env.json lms.auth.json 1. Create  server-vars.yml   in  / edx/app/edx_ansible/ 2. Add these following variables to server-vars.yml with your SMTP information: EDXAPP_EMAIL_BACKEND: 'django.core.mail.backends. smtp.EmailBackend' EDXAPP_EMAIL_HOST: '...

How to merge pdf pages horizontally in Ubuntu using pdfjam

To merge single-page pdf files horizontally, you can use pdfjam command line tool in Ubuntu: 1. Install pdfjam: $ sudo apt-get install pdfjam 2. Merge page1.pdf and page2.pdf (all are single page pdf files) horizontally: $ pdfjam page1.pdf page2.pdf --papersize '{21cm,29.7cm}' --nup 2x1 --landscape --outfile myoutput.pdf page1.pdf will be on the left, and page2.pdf will be on the right side of the output pdf file. Pretty neat!!!

How to split pdf pages in Ubuntu using pdftk

You can use this command to split pdf pages in Ubuntu: pdftk <original file name>.pdf cat <page number> output <output file name>.pdf Example: get page number 2 from the original pdf: pdftk mydoc.pdf cat 2 output page2.pdf

Replace inheritance permissions on folder/file using commandline in Windows server 2008

When you create a new folder or file (B) inside an existing folder (A) in Windows environment (It's Windows Server 2008 R2 in my case), B will inherit all the security access permissions of A. And you don't want that happen just like me. You can run this command in cmd to replace all the inherited aces (access control entries) from B with different ace set (the following will replace all the inherited trustee with domain admins and local administrators): icacls "\path\to\folder\or\file" /inheritance:r /grant:r "MYDOMAIN\Domain Admins":(OI)(CI)F /grant:r "Administrators":(OI)(CI)F /T Please be noticed that if you run this command via a bash shell (cygwin) instead of the Windows's cmd, you have to escape the "\", "(", and ")" characters: icacls "\\path\\to\\folder\\or\\file" /inheritance:r /grant:r "MYDOMAIN\\Domain Admins":\(OI\)\(CI\)F /grant:r "Administrators":\(OI\)\(CI\)F /T ...

Install MySQL-python using python-pip in Windows without errors

Assuming you have already installed python 2.7 and python-pip in your windows environment (windows 7 or later). Here are how you can install the MySQL driver painlessly: 1. Download and install: Microsoft Visual C++ Compiler for Python 2.7 Install this package will get rid of the error:  Unable to find vcvarsall.bat . 2. Install MySQL-python using wheel: + Install wheel using pip: pip install wheel + Download the whl file: http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python + Install MySQL-python with the downloaded whl file: pip install MySQL_python-1.2.5-cp27-none-win_amd64.whl

Last day of the Goat year quote

"You're never wrong to do the right thing." ~Mark Twain.

Quote of the day

"The world doesn't make sense until you force it to." ~Frank Miller.