My blog : Brain archives

Docker-composing my blog

Published July 5, 2015 in Docker - Last update on July 7, 2015.

As said in previous post about Docker, my blog's Docker Image is only a middleware container. It needs to be launch with a frontend, a database and optionnaly a cache. A solution for get ready to play with a full containerized architecture is docker-compose, with it I followed micro-services architecturing and only define one ...

Continue reading

Django Admin CLI

Published July 4, 2015 in Development, System administration - Last update on July 6, 2015.

I ever want to manage Django models directly from command line. In my dreams I have a curses script which have the same look and feel than Django Admin, in fact I created a CRUD application named Django Admin CLI. It is a Django third app linked to Admin's registry which allow DRY, easy ...

Continue reading

My Shell cheatsheet

Published June 25, 2015 in Development, System administration - Last update on July 8, 2015.

There are some tricks I do a long time ago then I forget or want to share:

Save time with history expansion

First daily use case, I want to run a command but I forgot to make it as root user.

$ ls /root/
ls: cannot open directory /root/: Permission denied
$ sudo !!
sudo ls /root/
file1 ...

Continue reading

Docking my blog

Published June 10, 2015 in Docker - Last update on July 6, 2015.

In my mind the master word of Docker is Fashion. So let's docker my blog ! It is a relativy a simple webapp, perfect for test Docker and micro-service architecture.

I won't make a new explanation of what are Docker and containers. For this kind of informations see the official doc. The great things ...

Continue reading

Django settings by environment

Published May 22, 2015 in Deployment, Development - Last update on July 6, 2015.

One thing not explained in Django Doc is how to make your project to live accross environments. Some settings need to have different values when used in production or testing, and testers might want to set their own values. A clear example is I wanna use a MySQL in production and SQLite in testing.

What ...

Continue reading

Python, table printing

Published May 21, 2015 in Development - Last update on July 6, 2015.

I always self-asked me how is the code used by mysql command for print tables. I ever don't know but I know how to do that in Python: With Format Specification Mini-Language.

Print a table

A script of my idea looks like this:

GUYS = ['tony', 'joe', 'ugo']
ROW_FORMAT = '| {0:5} | {1:30} |'

print(ROW_FORMAT ...

Continue reading

Ansible Part 1: J'ansible, Tu ansibles, il...

Published May 15, 2015 in Deployment, System administration - Last update on July 6, 2015.

Ansible is my favourite deployment and configuration management tools. After tested direct concurrency, Puppet and Chef, my choice naturally went to Ansible.

  • 1st it is in Python
  • 2nd it has a clear YAML syntax
  • 3rd it is simple.

What's the stack

My blog uses a classical Django webstack: Nginx + uWSGI + Django + MySQL. Because I ...

Continue reading

Because I didn't want to use Wordpress

Published April 30, 2015 in Development - Last update on July 6, 2015.

It's done, I've launched my weblog or more a brain archives.

Because I don't want to use Wordpress and I'm a Django developer, my first choice has been Zinnia: a weblog CMS powered by Django. So the first post will be simply about it.

So what's Zinnia

Django Blog Zinnia ...

Continue reading

StartSSL: Free SSL keys

Published April 20, 2015 in Web - Last update on July 6, 2015.

I have a HTTPS secure website and didn't want to pay for disable the ugly warning imposed by browser. My solution: StartSSL.com. It's a StartCom's webapp which deliver yearly SSL certificate for a single DNS.

It's a great non professional solution and has its disadvantages:

  • Authentication on website is made with ...

Continue reading

Yearly archives