Articles

Moving a Git sub-tree to its own repository

Coming from Subversion (and with Plone collective repository structure in mind), I’ve recently moved all my tiny software projects in a big standalone Git repository (named kev-code ). Now that I figured out that GitHub allows you to create unlimited amount of repositories, as long as they are open-source public …
➟ Read more

New blog header and tiny WordPress theme customizations

I maintain a bunch of websites for friends on my server. In this context, Maomium ’s owner owed me some bucks for his .com domain name. Here is the envelope I received yesterday with a check: Now that’s what I call a personalized letter! This original artwork is so …
➟ Read more

Apache commands

Redirects local /static/repository folder to external URL: Redirect permanent /static/repository https://kevin.deldycke.free.fr/repository Hide Subversion and Git directories content (source): RedirectMatch 404 /\.(svn|git)(/|$) Disable serving of PHP files coming from imported third party Javascript submodules (context): RedirectMatch 404 js-(.*)\.php$ Redirect any request to …
➟ Read more

Python commands

Strings  ¶ Replace accentuated characters by their ASCII equivalent in a unicode string: import unicodedata unicodedata.normalize("NFKD", "éèàçÇÉȲ³¼ÀÁÂÃÄÅËÍÑÒÖÜÝåïš™").encode("ascii", "ignore") Cleanest way I found to produce slugified / tokenized strings, based on boltons.strutils  : >>> from boltons import strutils >>> strutils.slugify(" aBc De F 1 23 4! -- ! 56--78 - -9- %$& +eée-", "-", ascii …
➟ Read more