Convert Ubuntu Server to authenticate with SSH key only and make user sudoer with no password

Make user Sudoer: [code] adduser ubuntu usermod -aG sudo ubuntu Edit sudoers "/etc/sudoers"password to don’t require password: %sudo ALL=(ALL) NOPASSWD: ALL [/code] Edit SSH configuration to authenticate by SSH key only: /etc/ssh/sshd_config [code] PermitEmptyPasswords yes PasswordAuthentication no [/code] “ubuntu” by DudeOmega is licensed under CC BY

Read More

Install PHP with Postgres support using HomeBrew

Most of the information is taken from this article: http://justinhileman.info/article/reinstalling-php-on-mac-os-x/ 1. Add the Formulas [code] brew tap homebrew/dupes brew tap homebrew/versions brew tap homebrew/homebrew-php [/code] 2. Install PHP with Postgres support [code] brew install php56 –without-mysql –without-apache –with-pgsql [/code] 3. Make sure it uses the Right Path [code] export PATH="$(brew –prefix)/bin:$PATH" [/code]

Read More

command ‘x86_64-linux-gnu-gcc’ failed with exit status in Python Django project

Typical error when a library that you want to install needs to compile and use some system libraries. First make sure you have: python-dev gcc [code] apt get install python [/code] Other libraries that could be needed: [code] sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml…

Read More

Programming with Python

Python is exciting! I have not found other language where I enjoy more coding. Python is fun, easy to learn and you can do basic stuff as well as complex implementations with understandable code.  

Read More

How to install Varnish on CPANEL Server

Installation 1. Make Apache listen in any other port other than 80. Here I am making Apache to listen in port 8080. It can be done in two ways. Either editing the httpd.conf file or editing the Tweak settings in WHM a) Editing httpd.conf file # vi /usr/local/apache/conf/httpd.conf Locate the following line in /usr/local/apache/conf/httpd.conf file and change the port…

Read More

Django Migrations with South

For a Django project using South you need to use the following commands in order to sync the DB: Start schema for app: Run manage.py schemamigration app_name  Run migration Run manage.py migrate app_name Reference: http://www.djangopro.com/2011/01/django-database-migration-tool-south-explained/

Read More

Phonegap Cross-platform Mobile development

PhoneGap is a mobile development framework produced by Nitobi, purchased by Adobe Systems.[3][4] It enables software programmers to build applications for mobile devices using JavaScript, HTML5 and CSS3, instead of device-specific languages such as Objective-C.[5] The resulting applications are hybrid, meaning that they are neither truly native (because all layout rendering is done via web…

Read More