Month: January 2012

  • How to login postgresql access psql from ubuntu user

    I use Ubuntu 11.10 Oneric and Postgresql 9.1 in this cases. So, when I need to dump database using “psql -U postgres” from ubuntu, I got several error like this : 123psql: FATAL:  role "ubuntu" does not exist psql: FATAL:  Peer authentication failed for user "postgres" psql: FATAL:  Peer authentication failed for user "postgres"

  • WordPress NGINX configuration solve gateway timeout

    You facing NGINX gateway timeout in wordpress. You already change php.ini and increase timeout but not solve the problem yet. Also, you increase timeout in HAProxy and not results yet. Then the problem come inside NGINX. Some cases it’s happen because Fast CGI timeout is so tight. Also, it because client response timeout also small. […]

  • How to make ssh into server without password

    This is mostly needed by beginner network admin which login into several server from their laptop / PC and inserting password each login. We can avoid this inserting password by using public keys. Now, go to client and generate public key by : 1ssh-keygen -t rsa

  • How to solve error syntastic loc_list in VIM

    I don’t know what the problem really are when I see this error every opening file in VIM : 1syntastic loc_list error But, it just need single line to fix it by : 1let b:syntastic_loclist = [] Now, I can get rid of the error that caused by syntastic plugin in VIM.

  • How to setup git server using gitolite in Ubuntu 11.10 Oneiric

    We can build git server using gitolite which also we can host into our Ubuntu. First, we wil act as client which need SSH public keys. Generate our ssh public keys and copy into /tmp by : 12ssh-keygen -t rsa cp ~/.ssh/id_rsa.pub /tmp/local.pub Now, we should install dependencies packages by :

  • Setup Django 1.3 development using Virtualenv in Ubuntu

    Building several Django projects using Virtualenv will easy your day. Sometimes it will helpful if we usually use several different modules in each projects. If you still not get about this Virtualenv. I will explain in simple ways. For instance, I have django projects located in : 1/var/www/mydjangoproject When deploying, I need several 3rd python […]

  • How to insert javascript code into WordPress from plugin using shortcode

    When we need to inserting Javascript blocks code programmatically into post, we know that WordPress autoescaping Javascript before write into tables. To make javascript inserting into post in WordPress, we can use shortcode. This feature meaning we define custom tag blocks in post and how to convert it tag. So, the tricks is we should […]

  • Convert time string into all date or datetime field format in Django

    I will guide you how to convert string that contain time into datetime that will stored into DateField() / DateTimeField() format in Django. For introduction, here are format for DateField() and DateTimeField that you can read all rest in here.