Fabrice's web : CV · Blogs (⇢ Madrid · ⇢ Science · ⇢ Everything)
HackerLogo.png

Blog: Hacks

This is a collection of tricks, scripts, one-liners, patches, hacks of all sort & anything related to computers and computing. Try at your own risks!

Making space in gmail

We all eventually get there:

Gmail-full.png

→ continue reading...

Referencing figures by a label in mediawiki

If you want to refer to images in Mediawiki the way you would in a $\mathrm{\LaTeX}$ document, you can use this cheap trick of mine...

→ continue reading...

KDE default profile

It's a pain that konqueror opens two panels by default in 'filemanagement' mode. I always have to close one by hand.

→ continue reading...

Emacs regexp for our compound decay rates notation

We find that algebraic sums of decay rates are fairly common, which make a notation such as $\gamma_{\widetilde{ij}}=i \gamma_a + j\gamma_\sigma$ useful (e.g., $\gamma_{\widetilde{31}}=3\gamma_a+\gamma_\sigma$). This is, however, a bit of a pain to typeset:

(e.g., $\gamma_{\widetilde{31}}=3\gamma_a+\gamma_\sigma$)

In emacs, this regexp substitution allows to transliterate \gamma_{31} into the widetilde form:

Replace regexp (default _{\([0-9][0-9]\)} -> _{\\widetilde{\1}}): 

Snowing in the browser

For Christmas, it's nice to feature a goody on one's website to participate to the overall merrier atmosphere. A favorite and immemorial web touch is the snow fall. It used to be popular on UNIX boxes as well though it apparently isn't so standard nowadays. As for the good old web, we like to use Scott Schiller's snowstorm, bringing snow to the web since 2003.

→ continue reading...

21844 files

If you look at what computers can do in terms of storing data, you feel sort of safe.

It's $2^{32}-1$ files (that makes 4 294 967 295) for NTFS, only 4 194 304 for FAT32 and a minuscule 65 536 for FAT16 which is however obsolete, while exFAT reads "Nearly Unlimited" [1].

→ continue reading...

Changing file extensions in multiple LaTeX files

That's a pretty concrete problem: I have multiple .tex file which include .eps extensions. I have converted all the postscript (old fashioned) stuff into brand new converted pdf, now calling figure.eps by figure.eps.convto.pdf.

This piece of code says the $\mathrm{\TeX}$ files about that daring move:

perl -pi -w -e 's/\\includegraphics(\S+)pics\/(\S+)\}/\\includegraphics$1fig\/$2\.convto\.pdf\}/g;' *.tex

→ continue reading...

Inflationary bubbles

This is the title I gave to this "kinetic digital sculpture" of mine, filed to the Wolfram Tweet-a-Program program:

→ continue reading...

Walter Zorn's tooltips v°0.2

I have upgraded my extension wz (named after Walter Zorn) to support more features of this great library that provides tooltips.

→ continue reading...

Wikilog titles and links

The Mediawiki Wikilog extension needs a hack to display title properly on our site.

→ continue reading...

From maps to multimaps

I am migrating from Evan Miller's extension of Google Maps, which is now archived (obsolete) to Pavel Astakhov's version, MultiMaps.

→ continue reading...

Mediawiki 1.22.1, lua, Scribunto and templates from Wikipedia

I am upgrading laussywiki to MediaWiki 1.22.1, mainly to support the new citation templates from wikipedia. They are great and I want a better/more thorough and more consistent quotation system.

→ continue reading...

Multipage extension for Inkscape

Inkscape has a multipage extension: http://sourceforge.net/projects/inkscape-pages. Thanks to its authors: Cosmin Popescu!

→ continue reading...

Turning Mathematica lists into hashes

Here is a short hack to turn Mathematica lists into hash tables.

→ continue reading...

Defining macros for Mathjax extension

\(\newcommand{\pt}{\partial_t}\)With MathJax, you can use \newcommand in enclosed $...$ characters to define a macro in any given page (e.g., \newcommand{\pt}{\partial_t} turns $\pt$ into $\pt$). If you want a popular macro to be defined once and for all, without having to include the definition each time, you have to declare it in a Config.js file.

→ continue reading...

Positioning the frame of extension Anysite

This is a trivial patch of MediaWiki Extension:Anysite to shift x-wise the included frame.

→ continue reading...

A simple way to quote from bibTeX in MediaWiki

I would like to quote references in MediaWiki from a $\mathrm{B{\scriptstyle{IB}}\TeX}$ (.bib) file.

The key indexing scheme I use is:

name-of-first-authortwo-last-digits-of-year-of-publication⇿$\alpha$

→ continue reading...

The nightmare of using a mac

I tried to install an open source software (kdenlive) on a Mac. For this, I had to install macports. For this, I had to install Xcode. For this, I had to register as a Mac OS developer

→ continue reading...

Convert QuickTime .mov file to mpeg

Movies downloaded from a mac bearing the .mov extension may fail to reproduce the video on other platforms (linux, windows, etc.), although the sound would still be played correctly. Most linux players will content to play the audio on a black screen. Xine complains about an unknown 'm2v1' codec. That's this hint which brought me to Carlos Aranda's blog

→ continue reading...

Stripping extension from files

The following command allows a variety of useful operations on files based on stripping their extension:

→ continue reading...