Category archives: Development

Computer programming, documenting, testing, and bug fixing involved in creating and maintaining applications

RSS feed of Development

What is a Libcloud driver ?

Published Aug. 9, 2015 in Cloud, Development - Last update on Aug. 25, 2015.

Most users uses Libcloud only for make request against a compute service. In fact the library covers several IaaS components:

  • Authentication
  • Compute service
  • Object storage and CDN
  • DNS
  • Load balancers

A driver is a Python class which after instanciation will allow you to handle one the service listed above (except authentication).

So, what's a ...

Continue reading

Contribute to apache-libcloud

Published Aug. 3, 2015 in Cloud, Development - Last update on Aug. 20, 2015.

In past I worked for CloudScreener.com as DevOps, I had in my responsabilities clouds benchmark. Computes' performances was mesured against a lot VMs categorized by the current parameters:

  • Size or flavor: Number of vCPU, RAM size and root volume size
  • Image: Chosen OS
  • Location: Datacenter or region

As many public clouds don't use ...

Continue reading

Unittest and reusable app

Published July 19, 2015 in Development - Last update on July 18, 2015.

You had fun, you wrote a Django third app. You should have write unittests before but you didn't know where to place them. For my case when I wrote Django Admin CLI I used the work made in Django Comments, let's explain it a little.

All testing code are stored in tests/ directory ...

Continue reading

Jerome Debray's tools

Published July 7, 2015 in Development, Web - Last update on July 8, 2015.

One tool I use a long time ago is CSS mutli-column generator by Jerome Debray. This tools helps me to make a correct CSS for create <li> in sereral columns. Simple example:

  • Column 1 - Row 1
  • Column 1 - Row 2
  • Column 2 - Row 1
  • Column 2 - Row 2

CSS used:

-moz-column-count:2;
-webkit-column-count:2;
-o-column-count ...

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

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

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