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!

Emacs Proofing LaTeX

I often need to clean out the proofing notes one makes for editors and co-authors in $\mathrm{\LaTeX}$ prose:

Screenshot 20240518 132554.png

→ continue reading...

Debugging sopi

sopi works great except when it doesn't, in which case he just vomits an error message like this:

→ continue reading...

Moving numbered files to add one entry

Say you have files like this:

lecture1.tex
lecture2.tex
lecture3.tex
...
lecture13.tex
lecture24.tex

and need to add a new lecture5!

→ continue reading...

doi2bib or parsing doi into bibTeX entries

From about 2003, when I started to compile scientific references, till now, I have been entering references in my sci.bib bibTeX file by hand! That included 3549 entries according to bibtex-count-entries. This stops today.

→ continue reading...

bib2wiki or parsing bibTeX into mediawiki templates

In a previous post, I was discussing a prospective bib2wiki script to automatize the transcription of my bibTeX database to laussy.org (this website). This was over 10 years ago, so I forgot what I did back then. I had to do it again.

→ continue reading...

Overlapping subtitles in kdenlive

kdenlive uses a 25th of a second accuracy for the millisecond timestamp $t$, which thus becomes converted to the nearest integer $\lfloor{t/40}\rceil$ (there are forty fractions of 1/25s in a second). So if you have, say:

00:00:02,764 --> 00:00:03,705
So now...

→ continue reading...

Timestamps in srt files with Mathematica

This describes a hack to manually find the overlapping subtitles in a srt file (and do other more interesting things).

→ continue reading...

Extracting citation counts from a Google Scholar page

Say you want to extract the citation counts from someone's Google Scholar page (here from Jeremy Baumberg):

Screenshot 20230625 105122.png

→ continue reading...

Merging Columbus CSV files

To merge various tracks from the Columbus P-10 device so as to assemble a global picture of your whereabouts, one can follow the steps below.

→ continue reading...

CSV to GPX for Columbus P-10 Pro

However great GPSBabel can be, it still fails to be conversant with the great Columbus GPS logger. This is how we convert its CSV file to GPX.

→ continue reading...

Overlay images with Imagemagick

I should be on Holiday! But I'm trying to finalize this animation for my perspective for Quantum:

Pnm-BEC-two-oscillators-resized.gif

→ continue reading...

mp3 files in mediawiki without flash

Flash is no longer supported, maybe the worst thing to happen in 2021 (and there's a pandemic going on). Among some of the best things to go, the fantastic lightweight, efficient and elegant dewplayer to play mp3, which served us so well all this time! (the site says that "Dewplayer n'est plus, mais renaîtra, un jour. «When it's done»)Screenshot 20210321 191223.png. You'd think mediawiki would offer tons of replacement. Strangely, it turns out to be quite difficult to find how to bring mp3 to your wiki! (see what's available). HTML5 is the solution.

→ continue reading...

Starting a counter in mediawiki without extension

Say you want to count like this in mediawiki (not starting at 1):

    1. Three
    2. Four
    3. Five

The internet tells you it's not possible natively and that you need an extension. Here's an ugly hack to do it anyway! (keeping the # rather than going full HTML).

→ continue reading...

Lastres de Mujer animation

Elena and Julia made a video-clip for Lastres de Mujer, one of Elena's songs (you can see it here). It consists of stop-motion animation of some of Julia's drawings that she arranges in a book. We shot pictures in rafales that we turned up into a movie following these simple steps.

→ continue reading...

Stitching mp4 in linux

Rendering a video is extremely lengthy. If you want to alter a little part of it, you certainly do not want to render the whole thing again. Here's what you can do instead.

→ continue reading...

Vals del vampiro animation

Carlos Sánchez, who has all the talents, composed a song (El Vals del vampiro), for which Elena, in a sequence of events that I did not follow in details, came to compose the lyrics. They decided to make a stop-motion animation to release the piece on YouTube (you can see the result here). At this point, I got involved for the minor technical aspects of assembling the artwork (also from Elena) into the said animation. These are the steps I followed to do so, which I store here mainly for my own recollection.

→ continue reading...

Forcing et al. for all BibTeX entries with more than one author.

If you're tight in space (e.g., for a conference abstract) and want all entries to read F. Author et al., BibTeX doesn't usually help you much (biblatex would allow that but the more common natbib doesn't). The easiest fix is to hack the .bst file!

→ continue reading...

Timelapse of a drawing

Elena took various pictures of her drawing Maternidad and wanted to do a timelapse. This lists the steps to do so.

→ continue reading...

Supplementary TeX material on arXiv

Papers increasingly come with a supplementary material. This is in principle good as providing all the gory details, except that often this is where the authors flush out what didn't fit in the allotted space of the main text, so supplementary of PRL, for instances, are particularly tough (as often required-reading)

When you upload your prose to arXiv, you typically want the supplementary to be there as well. That's not easy to do.

→ continue reading...

Common.js on mediawiki

Each mediawiki web has a MediaWiki:Common.js page (see, e.g., that of Wikipedia) that runs java script on each page. That's a powerful tool (apparently to be deprecated at some point). Installation should be straightforward but for some reason, can sometimes be frustratingly painful, so I give a particular example that should work on its own.

→ continue reading...

« newest ‹ newer 20 ... oldest »