Le mois dernier j'ai rapidement présenté le language Python et les frameworks web existants à mon équipe à Voyages-Sncf.com.
Les slides sont accessibles ici, ainsi que les sources Markdown pour Reveal.js.
Il …
Depuis une dizaine d'années, j'ai cette petite idée dans un tiroir. Une série télé qui présenterait le quotidien de politiciens, présentés comme des super héros. Peut-être en insérrant des passages où ils se verraient les uns les autres en justaucorps et collans multicolores. Ou alors par un habile jeu de …
...in just one command :
cd path/to/your/git/repo
cat <<EOF >.git/hooks/pre-rebase
#!/bin/sh
echo -n \$'\x1b[36m' # start coloration (cyan)
curl -s https://raw.githubusercontent.com/jenkinsci/chucknorris-plugin/master/src/main/java/hudson/plugins/chucknorris/FactGenerator.java | sed '1,/FACTS = {/d;s/^ \+"//;s/"..\?$//;/^$/,$d …
In any UNIX shell, the following will always work out of the box:
browserify src/main/lib/js/*.js > out-bundle.js
But of course, not under Windows.
And browserify
does not accept directory names as primary parameter, nor wildcard globbing patterns. There is a pending issue & pull request aiming to …
Did you ever got this infamous error message in Firefox debug console (with CSS error messages enabled) ?
downloadable font: Layout: DFLT table doesn't satisfy the spec. for script tag DFLT (font-family: "MyBeautifulFont" style:normal weight:normal stretch:normal src index:1) source: http://W.X.Y.Z/fonts/myfont …
Python generators are awesome. Why ?
- their syntax is simple an concise
- they lazily generate values and hence are very memory efficient
- bonus point: since Python 3 you can chain them with
yield from
Their drawback ? They can be iterated only once, and they hide the iterable length.
I took an …
A year ago, I built a small JS lib using D3.js to visualize JSON-defined genealogy trees.
At the beginning of the year, I added a new feature using flex-calendar and moment-ferie-fr : a birthday calendar using the same JSON genealogy definition and miniature images.
I added this calendar to the …
First, lets mention Git Bash (aka msysgit) : the old version was a PITA to extend with additional packages (e.g. adding common C libs like libxml), and the new one (renamed Git for Windows), is based on MSYS2, but does not include a package manager.
Hence, we were left with …
... and the standard UNIX tool zipinfo
cannot display them !
So here is Python one-liner to extract them, and other useful meta informations:
python -c "import json, sys, zipfile; json.dump([{k: str(getattr(i, k)) for k in zipfile.ZipInfo.__slots__} for i in zipfile.ZipFile(sys.argv[1]).infolist …
I'm not really crazy about Yeoman's grunt-usemin : I find painful the way it enforces a unique pipeline, with its preliminary useminPrepare
task and :generated
targets.
But on the project I'm working on, we made the choice to use it early on, and we're sticking with it for now. And this …
git-appraise - Distributed code review system for Git repos
À l'est d'Eden est un livre de John Steinbeck. Synopsis : Une fresque générationnelle suivant deux familles à travers l’histoire du pays de l’aute (1952).
Run any browser instantly online. Supports all release and beta versions of Chrome, Firefox, IE, and Opera.
GitHub-powered work tracking for teams and open source.
Say you are generating a colored diff output with the standard difflib
Python package:
diff = difflib.ndiff(file1_lines, file2_lines)
print('\n'.join(diff))
Now, I'll show you how to write a simple color_diff
function that you can use to color your diff like this:
diff = difflib.ndiff(file1_lines, file2_lines)
diff …
OuiShare is a non-profit and global community empowering citizens, public institutions and companies to to build a society based on openness, collaboration and sharing.
Loomio est un outil de prise de décision collaboratif, en ligne et simple d'utilisation. Il permet à des groupes dispersés de prendre des décisions rapidement et passer à l'action.