The following is a basic command to continue (part of) a Subversion repository as a git repository.
Continue reading
Abridged git repository history
It is sometimes useful to have a repository for a project that shows only the main points in history. It is possible to start from git repository with full history and create such an abridged history in a separate branch. You can do this efficiently in git by reusing the original tree objects. This post will do a walkthrough for the Mediawiki repository.
Continue reading
Handling merge conflicts with git
Like a similar post for Mercurial, this tip tries to document a list of systematic steps to handle merge conflicts with git.
Continue reading
Bash Arrays
Arrays are the main advanced data structure in Bash, but the syntax can be hard to remember. The following list summarizes the main operations.
Continue reading
Makefile auto dependencies with GCC
There are many ways of having automatic dependencies in a Makefile
. The following, however, is the most clean and complete solution that I know of for modern compilers.
Continue reading
A Makefile for LaTeX documents
This is a Makefile
that I’ve perfected over the years for rendering typical LaTeX articles or presentations (e.g. for scientific papers). It handles almost all LaTeX documents, except for large documents that use the \include feature (this is for another tip). It assumes your document has a bibtex
bibliography.
Continue reading
The x264 encoding guide gives a nice explanation of the different options for H.264 encoding. Normally:
ffmpeg -i in.avi -strict experimental -crf 23 -preset medium out.m4v |
Where you can deviate from the above defaults:
- -crf [18-28]
- perceived output quality (lower crf is better quality)
- -preset [ultrafast,superfast,veryfast,faster,fast,medium,slow,slower,veryslow]
- compression effort (slower preset is better compression)
Joining H.264/AAC video files
It is possible to join H.264/AAC video files without re-enconding, if you convert them to an MPEG transport stream (TS). This format supports concatenation. Of course, the video files need to have the same height and width, aspect ratio,…
Continue reading
Decoding UTF-8 streams
UTF-8 is one of the most commonly used methods to encode unicode characters into byte values. It has some interesting properties, for example, characters from the ASCII codeset retain their encoding. This is an implementation of UTF-8 decoding in OCaml.
Continue reading
Using wget to mirror entire website folder
GNU wget can create a very usable local or offline mirror of an entire folder of a website using the following combination of options.
Continue reading