| // | |
| // PrintLocalesController.m | |
| // NSFormatterTest | |
| // | |
| // Created by Maciek Grzybowski on 02.04.2014. | |
| // | |
| #import "PrintLocalesController.h" | |
| @interface PrintLocalesController () |
| Here is my django-coverage walkthrough. A nice minimal sample project showing django-coverage in action is https://github.com/pydanny/django-party-pack | |
| 1) Add to requirements.txt: | |
| django-coverage==1.2 | |
| coverage==3.4 | |
| 2) In your virtualenv, do a "pip install -r requirements.txt" | |
| 3) Add to settings.py: |
| /* | |
| (c) by Thomas Konings | |
| Random Name Generator for Javascript | |
| */ | |
| function capFirst(string) { | |
| return string.charAt(0).toUpperCase() + string.slice(1); | |
| } | |
| function getRandomInt(min, max) { |
A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.
Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.
This gist was created based on the following guide: upgrading to postgresql 11 on centos 7
Create a backup:
sudo -Hiu postgres pg_dumpall > mybackup.sqlInstall PostgreSQL 11:
| """ | |
| Django ORM Optimization Tips | |
| Caveats: | |
| * Only use optimizations that obfuscate the code if you need to. | |
| * Not all of these tips are hard and fast rules. | |
| * Use your judgement to determine what improvements are appropriate for your code. | |
| """ | |
| # --------------------------------------------------------------------------- |
| # KE | |
| SAFARICOM: "/(\+?254|0|^){1}[-. ]?[7]{1}([0-2]{1}[0-9]{1}|[9]{1}[0-2]{1})[0-9]{6}\z/" | |
| AIRTEL: "/(\+254|0|^){1}[-. ]?[7]{1}([3]{1}[0-9]{1}|[8]{1}[5-9])[0-9]{6}\z/" | |
| # TZ | |
| TIGO: "/(\+?255|0|^){1}[-. ]?([7]{1}[1]{1}[2-9]{1}|[6]{1}[57]{1}[2-9]{1})[0-9]{6}\z/" |