Ir al contenido principal


Mostrando entradas de 2014

I don't git it.

A lot of people praise git. I liked it at first, now I don't geet it.

Some weird stuff I've found in git, in no particular order:

You can pretend to be anyone. Just change your [user] name and email in .git/config and commit away. As long as when you push you use valid credentials, the commits will be recorded as from someone else. (At least this is possible on GitHub, I know git doesn't implement any specific user access control.)
* I guess you could try to enforce signing commits but as anything besides the basics, that gets pretty complicated on git.Steep learning curve that keeps getting steeper. Ok: git init, git add, git rm -r, git commit -am, git remote add, git fetch, git merge -ff, git push and pull -u of course, git checkout -b, git reset --mixed, git revert HEAD ... Those are just some of the basics... Ever tried to incorporate git subtree pull -P prefix --squash > into your workflow? I have, it's not fun (keep reading).Its super complicated to collaborate…

ISO 3166-2 region list for PHP

Thanks to Jerome Mouneyrac for pointing out that the iso-codes package in Debian is a good source for this data, as well as the script to turn it from XML to PHP.
This particular list comes from the 3.52 release of the package, which can be found online here. To make your own list out of a newer release get the XML file by clicking on iso-codes-[tag] on that page, then tree > iso_3166_2/iso_3166_2.xml ; and then use this script (fixed/improved from Jerome's).

Copyright Notice

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.
You should have received a copy of th…