VirtualTam's bookmarks

  1. csv [sebsauvage] 2015-07-24

    MOUHAHAHAHAHAHAHA

    • Alors comme ça tu veux faire du CSV ?
    • Et tu crois vraiment que tu peux écrire toi-même facilement un parseur de CSV ?
    • Tu crois vraiment qu'il te suffit de faire un bête split() sur chaque ligne du fichier pour t'en sortir ???
    • T'es vraiment sûr que t'as pensé à tout ?
  2. Context: replace spaces by dashes in a script-generated HTML file's links

    1awk -F\' 'm = /a href/ { gsub(/ /,'-',$2); print$1'\''$2'\''$3} !m {print $0}'
    
  3. To import a certificate to a Java keystore:

    $ keytool -import -alias <alias> -file <file>.crt -keystore <keystore>

    Example (Linux w/ OpenJDK 7):

    $ /usr/lib/jvm/java-7-openjdk-amd64/bin/keytool -import -alias <alias> -file <file>.crt -keystore /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/security/cacerts

  4. Includes support for Coverage, Xunit and other cool stuff ;-) Oh, and there is parallel testing, too \o/

    nosetests --with-coverage --cover-erase --cover-tests --cover-html --cover-html-dir=htmlcov --with-xunit --xunit-file=unit.xml

    via http://www.alexconrad.org/2011/10/jenkins-and-python.html

  5. Uses a project or repository's history to plot user contributions, displaying an elegant, colored graph of the file arborescence.

    After running it on quite different projects...

    • Python/Bash CI/Jenkins scripts
    • Qt apps: GoldenDict, Psi+
    • PHP website: Shaarli

    ...watching some vids on teh intartubez:

    It allows to arbitrary spot some interesting implementation aspects (sorted by descending impact):

    • language-dependent trees (oh hai Java packages ^^)
    • framework-dependent trees
    • project-management method (none, Agile, TDD)

    Having a graphical tool also quickly shows:

    • the overall structure of the project (a bit cooler than a simple $ tree, way quicker than loading the project on an IDE)
    • the repartition of files (by extensions)
    • who are the most active contributors
    • what are the most modified files over time
    • who does what: additions, deletions, refactoring

    Some more CI-related matters:

    • are there any tests?
    • what is the source code / test code ratio? (we could expect a project/lib with N modules to have at least N test modules)
    • who initiates / implements / optimizes test code?
  6.  1# setup a transifex virtualenv
     2virtualenv2 VENV; source VENV/bin/activate; pip install transifex-client
     3
     4# global config: ~/.transifexrc
     5# this step can be omitted, as 'tx init' will create the file if it doesn't exist
     6[https://www.transifex.com]
     7username = User
     8token =
     9password = un54f3_p4ssw0rd!
    10hostname = https://www.transifex.com
    11
    12# setup example project
    13mkdir example; cd example
    14tx init
    15tx set --auto-remote https://www.transifex.com/projects/p/my-project/
    16
    17# get the files
    18tx pull -l pt_BR
    19
    20# edit things
    21poedit / linguist-qt4
    22
    23# push to transifex
    24tx push -t