Work on remote branch in Git

Branching is too helpfull for a development. If some of your coworker has pushed a his local branch to remote branch and you want to make some changes to it you can do it by checkout. To check out his/her branch on your local machine you need to follow these Get the remote branch in your machine git fetch origin Where origin is a remote server. Now when you will do git branch -r you can see all the branches which has been pushed to remote. Since you can not work someone else branch you have to checkout his branch to your local and then do modification. To do so you have to checkou…

IOError: cannot write mode P as JPEG | IOError: decoder jpeg not available

uninstall PIL pip uninstall PIL sudo apt-get install libjpeg-dev libfreetype6-dev zlib1g-dev libpng12-dev pip install PIL --upgrade If everything works you will see -------------------------------------------------------------------- PIL 1.1.7 SETUP SUMMARY -------------------------------------------------------------------- version 1.1.7 platform linux2 2.7.4 (default, Sep 26 2013, 03:20:26) [GCC 4.7.3] -------------------------------------------------------------------- *** TKINTER support not available *** JPEG support not available *** ZLIB (PNG/ZIP) suppor…

Execute linux command in background or Execute Commands After You Exit From a Shell Prompt

Problem: After running a command on remote server some time you need to close your terminal or pc or the command takes too much time to process and you cant wait for completion. for such problems you would want to run the command in background to do so we have nohup. From Man page it says nohup - run a command immune to hangups, with output to a non-tty You use nohup nohup command-name & Please note & it is required to run the command in background. Example nohup tar -cvz file.tar.gz folder1 folder2 & The above command will compress the folders in background and eve…

Allowing ubuntu user to access www folder amazon aws

sudo apt-get install apache2 sudo a2enmod rewrite sudo apt-get install libapache2-mod-php5 sudo /etc/init.d/apache2 restart sudo adduser ubuntu www-data sudo chown -R www-data:www-data /var/www sudo chmod -R g+rw /var/www…

Installing virtualenv in ubuntu

Virtualenv is a tool to create isolated Python environments. There is multiple ways to install virtualenv I'm gonna use one of the esiest way to install it. Installing via pip : To install via pip you have to install pip sudo apt-get install python-pip check installed pip which pip Then install virtualenv pip install virtualenv Now check where virtualenv got isntalled which virtualenv to create a enviroment run following line virtualenv ~/env/project --no-site-packages env/project is a path where environment will get created. To activate environment source ~/env/tweep…

Fatal error : watch ENOSPC

Recently while running nodemon for the first time I got an error which states :- Error: watch ENOSPC at errnoException (fs.js:1019:11) at FSWatcher.start (fs.js:1051:11) at Object.fs.watch (fs.js:1076:11) at Object.watchFileChecker.check (/usr/lib/node_modules/nodemon/nodemon.js:160:6) at ready (/usr/lib/node_modules/nodemon/nodemon.js:49:22) at /usr/lib/node_modules/nodemon/nodemon.js:63:11 at ChildProcess.exithandler (child_process.js:641:7) at ChildProcess.EventEmitter.emit (events.js:98:17) at maybeClose (child_process.js:735:16) at Socket.<anonymous> (child_process.js:948:11) S…