COMODO Positive-SSL sec_error_unknown_issuer on firefox    Posted:

Tempted by post on official google admins blog it's about higher ranking when having https. So I have recently bought cheap ssl certificate from known issuer COMODO and upgraded my server with it but it caused several problems when I redirected from 80 to 443 some 3rd party apps (like userena for django) created loops but I found solution quickly it was to put USERENA_USE_HTTPS=True in but it still sends more forgot password mails than it should but it's different story.

Comming back to point if you are experiencing error "sec_error_unknown_issuer" in firefox after implementing COMODO Positive-SSL certificate this solution may help you. Don't know exactly but I read that it has something to do with chain certificates they should be bundled inside you website certificate. And remember you have to do it in right order because first one should be your servers certificate cause it's signed with key) and nginx or whatever you use may have problems after reloading service.

My command for bundling was:

cat exerceo_pl.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > exerceo_pl.bundled.crt after that I had just to point my nginx.conf to new bundled certificate. And after all reaload of nginx fixed my unknow issuer firefox problem.


xrandr tips    Posted:

adding resolution 1)generate mode cvt 2560 1440 60 ➜ blog git:(website) ✗ cvt 2560 1440 60 # 2560x1440 59.96 Hz (CVT 3.69M9) hsync: 89.52 kHz; pclk: 312.25 MHz Modeline "2560x1440_60.00" 312.25 2560 2752 3024 3488 1440 1443 1448 1493 -hsync +vsync

2)add it to xrandr sudo xrandr --newmode "2560x1440_60.00" 312.25 2560 2752 3024 3488 1440 1443 1448 1493 -hsync +vsync setting resolution

3)sudo xrandr --addmode VGA-0 "1680x1050_60.00"

xrandr -q xrandr --verbose

xrandr --output HDMI-0 --mode 2560x1440

irst generate a "modeline" by using cvt Syntax is: cvt width height refreshrate

cvt 1680 1050 60 this gives you:

# 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz Modeline "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync Now tell this to xrandr:

sudo xrandr --newmode "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -

First clone the two screens, (the smaller screen will display the top left portion of the virtual screen)

xrandr --output VGA --auto --right-of LVDS

System Message: WARNING/2 (<string>, line 34)

Block quote ends without a blank line; unexpected unindent.

xrandr --output LVDS --mode 1280x800

xrandr --output LVDS --mode 1280x800 --rate 75

xrandr --output LVDS --auto xrandr --output LVDS --off --output HDMI-0 --auto

xrandr --output VGA1 --mode 1024x768 --rate 60

#Laptop right extra Monitor Left #xrandr --output VGA1 --left-of LVDS1

#Laptop left extra Monitor right xrandr --output LVDS1 --left-of VGA1

#This is to set your primary monitor.

#This sets your laptop monitor as your primary monitor. xrandr --output LVDS1 --primary

#This sets your VGA monitor as your primary monitor. #xrandr --output VGA1 --primary

xrandr --output VGA1 --mode 1024x768 --rate 60 xrandr --pos <x>x<y> $ xrandr --left-of <output> $ xrandr --right-of <output> $ xrandr --above <output> $ xrandr --below <output>

Option '-pos' is more flexible which can place output to anywhere, for example:

$ xrandr --output VGA1 --pos 200x200 $ xrandr --output LVDS1 --pos 400x500

xrandr -o right


Django Display choices defined in models in template    Posted:

example: Having model:

    (1 , 'Male'),
    (0 , 'Female'),

class Profile(UserenaBaseProfile):
    name = models.CharField(max_length=100,null=True,blank=True)
    surname = models.CharField(max_length=100,null=True,blank=True)
    sex = models.NullBooleanField(blank=True,null=True,choices=GENDER)
    born = models.DateTimeField(blank=True,null=True)

    def __unicode__(self):
        return str(

we can display Male or Female choice value in template by:



docker on 32bit system (windows 7 on core2duo)    Posted:

Docker is very usefull tool for fast shipping application with its dependicies. It's totally different from Vagrant which I used before . Using them both may be very powerfull tool. So I started to play with docker but I had problem - my everyday environment is Debian but at my work I got 32bit core 2 duo workstation with windows7 installed (and no possibility to work on my laptop - security). Fortunatelly this processor has VT-x support so I could run 64bits virtual machines. I wanted to install boot to docker but unfortunatelly installation and boot2docker.exe are for 64 bits only so I just used their iso image because it was very lightweigh. First of all I had to convert this "live cd" image to vmdk I used this one qemu-img convert -f raw -O vmdk Nowyfolder/boot2docker.iso boot2docker-disk.vmdk

Now we have ready boot2docker disk out of live image. Start virtualbox, create new virtualmachine, select linux 64bits, and when there will be step with disk choose Existing disk option and select newly created boot2docker-disk.vmdk

after all I could start to create new virtualbox machine and select vmdk disk to existing one boot2docker-disk.vmdk we have ready and working virtual boot2docker machine .


docker    Posted:

First download download pre build image :

sudo docker pull ubuntu

run pseudo tty:

sudo docker run -t -i ubuntu /bin/bash

get image of running docker:

sudo docker ps

output: ➜ ~ sudo docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES c4fbc80d8926 ubuntu:14.04 /bin/bash 3 minutes ago Up 3 minutes berserk_nobel ➜ ~ save container as your image: ============================= sudo docker commit c4fbc80d8926 myimage_name

Running our image:

sudo docker run -t -i myimage_name /bin/bash

Deploying your app and dependicies:

watch out to save container before you quit bash inside docker instance find container id and save

Diff image container:

sudo docker diff

Start docker container with name:

sudo docker run -i -t --name="IWAPPS2" iwapps /bin/bash

Commit with name :

sudo docker commit IWAPPS2 local -a "greg" -m "First image commit"

Actually, images are stored within /var/lib/docker/aufs/diff

OUP sudo docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 95585eb7ea3c cc68531a3552 /bin/bash About a minute ago Up About a minute mad_ptolemy ➜ OUP sudo docker commit 95585eb7ea3c iwps2 -a "greg" -m "First image commit" c86eeb858bedf779105f759ca62d10ea59e01884e985e447d9ddf7f65ee32e3c ➜ OUP sudo docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE iwps2 latest c86eeb858bed 5 seconds ago 617.5 MB local latest 539a99ee88ee 22 minutes ago 348.5 MB <none> <none> d8f374aecae4 2 hours ago 348.1 MB iwapps latest 85e0ae955062 4 hours ago 348.1 MB ubuntu utopic b8d67033ed07 23 hours ago 286.6 MB ubuntu 14.10 b8d67033ed07 23 hours ago 286.6 MB ubuntu trusty 1357f421be38 23 hours ago 192.7 MB ubuntu latest 1357f421be38 23 hours ago 192.7 MB ubuntu 14.04 1357f421be38 23 hours ago 192.7 MB ubuntu 14.04.1 1357f421be38 23 hours ago 192.7 MB ubuntu 12.04 2bed76595591 23 hours ago 120.2 MB ubuntu 12.04.5 2bed76595591 23 hours ago 120.2 MB ubuntu precise 2bed76595591 23 hours ago 120.2 MB <none> <none> 96864a7d2df3 3 weeks ago 205.1 MB ubuntu 12.10 c5881f11ded9 3 months ago 172.2 MB ubuntu quantal c5881f11ded9 3 months ago 172.2 MB ubuntu raring 463ff6be4238 3 months ago 169.4 MB ubuntu 13.04 463ff6be4238 3 months ago 169.4 MB ubuntu saucy 195eb90b5349 3 months ago 184.7 MB ubuntu 13.10 195eb90b5349 3 months ago 184.7 MB ubun

pt The images are stored in /var/lib/docker/graph/<id>/layer.

Note that images are just diffs from the parent image. The parent ID is stored with the image's metadata /var/lib/docker/graph/<id>/json.

When you docker run an image. AUFS will 'merge' all layers into one usable file system.

docker inspect docker images --no-trunc=true

Running an interactive shell sudo docker run -i -t ubuntu /bin/bash

sudo baobab /var/lib/docker

docker pull ubuntu docker run -i -t ubuntu:14.04 /bin/bash sudo docker info sudo docker version sudo docker search ubuntu sudo docker pull ubuntu sudo docker images


create blog with nikola    Posted:

Sometimes blogs are not so bad to write your thoughts. This is good place to come back for solution we've found previously spending hours searching for it .

If we want to have more options to edit blog style or anything or host it on our server or github there are a lot of blog generators . One of them is Nikola .. link:

First of all just install nikola with pip on your system (best way is to use python virtualenv for python applications)

pip install nikola

then start new blog

nikola init my_blog

You can choose between themes to list available themes

nikola install_theme -l

there is also possibility to use bootswatch theme remember not all themes works with bootswatch

nikola install_theme bootstrap3-jinja
nikola bootswatch_theme -n custom_theme -s amelia -p bootstrap3-jinja


Linux list openports with processes names    Posted:

netstat -putln

-p the PID and name of the program to which each socket belongs.

-u udp

-t tcp

-l only listening sockets. (These are omitted by default.)

-n numeric port number

(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
 Active Internet connections (only servers)
 Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
 tcp        0      0    *               LISTEN      -
 tcp        0      0 *               LISTEN      -
 tcp        0      0    *               LISTEN      -
 tcp        0      0*               LISTEN      -
 tcp        0      0   *               LISTEN      -
 tcp        0      0*               LISTEN      -
 tcp        0      0  *               LISTEN      -
 tcp        0      0*               LISTEN      -
 tcp        0      0  *               LISTEN      -
 tcp        0      0    *               LISTEN      -
 tcp        0      0*               LISTEN      -
 tcp6       0      0 :::22                   :::*                    LISTEN      -
 tcp6       0      0 ::1:631                 :::*                    LISTEN      -
 tcp6       0      0 :::25                   :::*                    LISTEN      -
 tcp6       0      0 :::9418                 :::*                    LISTEN      -
 udp     5376      0  *                           2934/libpepflashpla
 udp        0      0  *                           -
 udp        0      0 *                           -
 udp        0      0   *                           -
 udp6       0      0 :::5353                 :::*                                -
 udp6       0      0 :::57898