jerous' ::1

Listing of these articles
2014-03-13 [E] [D]
programming,code Comments 0

As I was archiving some documents lately, I thought about using git as my backup tool.

I considered other tools, like boar (not distributed), git-annex (had a git-annex binary not working due to bad dependency, and couldn't use it anymore; also I somehow lost some videos using it) and bup (still considering it :)).

Main advantages of git are that its a very stable and common program, supported on UNIX and Windows, it's fast, has checks for the integrity of the repository, and can be synced distributed easily using push and pull.

Disadvantages are that it's not a backup solution. It is not suitable for binary files (well, it does just fine, but it doesn't diff), can't handle large files well. Another disadvantage I encountered using git (after writing this script), is that when a checksum fails, you'll have to retrieve the correct object from somewhere else. And, finally, it doesn't track metadata like user id, permissions, modification time.

Especially the latter bothered me; there can be some valuable information in mtime and permissions. Hence, based on etckeeper I devised a small script which keeps track of uid, guid, atime, mtime and permissions. Upon committing, checkout and update it will store or restore these attributes.

As it tracks all files, commit, check-out and pull operations can take (a lot) more time, as it will stat or update all files metadata.

Quick usage instructions: download git-store-metadata.sh. Navigate to the root of the git-repository, and

1
2
3
 # git-store-metadata.sh install
 # git-store-metadata.sh store
 # git push

In the other repositories, do

1
2
 # git pull
 # git-store-metadata.sh install

As of now, the attributes should be kept up-to-date transparently.

I have not tested this script extensively, nor have I checked the edge cases yet. So, use at your own risk.

Edit: Preliminary par2 support was added for the .git/objects folder to protect against corruption of the repository. It allows you to generate recovery files that can detect and correct errors. These recovery files are stored inside the .git folder, so are not a part of any commit or repository, and are local only. As it takes a lot of time, I have to look for a good tradeoff between correctability and time.

1
2
 # git-store-metadata.sh generate
 # git-store-metadata.sh repair
Will respectively generate recovery files, and repair will check and if errors are detected, they will be repaired, if possible.

The par2 support is only on the local repository. I.e. if you push the remote repository no recovery files are created on the remote repository. This is mainly because it seems difficult to keep the par2 files up to date on the remote. For example, pushing to a remote repository sometimes succeeds and sometimes fails. However, if pushing to a remote succeeds, then the existing par2 files are not up to date with the new set of files, and repair is not possible anymore.

Another critical thing to keep in mind: after a garbage collection has been performed, the par2 metadata must be regenerated. However, as there is no hook after a garbage collect (there is a pre-auto-gc, which is only run after automatic, or "--auto" garbage collects), this can not be done automatically. After a gc, a verify and/or repair will fail.

Also if there are many files, gathering or restoring metadata might take a while, so maybe we can take the commits into account to determine what files to update.

Read further for a detailed working example, and the source code of the script.

read more...

2014-01-06 [E] [D]
/tag/ Comments 0

To clockwise rotate an aac-encoded .mov file with ffmpeg, use:

1
ffmpeg -i INPUT.MOV -vf transpose=1 -r 30 -strict -2 -ar 44100 INPUT_rotated.MOV 

With,

  • -vf transpose=1 takes care of the rotation [ffmpeg filters]
  • -strict -2 enables the experimental aac encoder
  • -r 30 ensures we have enough B-frames, and thus enhances quality [source 1] [ffmpeg doc]
  • -ar 44100 sets the audio bitrate; not setting this results in ffmpeg exiting with an error code [source 2] [ffmpeg doc]

I used it to rotate a video that had been captured by a photo camera. Other angles can be easily accomplished too, just check the ffmpeg filter documentation.

Previous year, during a trip of Sweden, Finland and Estonia I did with a friend, we also had our first steps in couch surfing with Sara in Tampere and Annika in Tallinn, both marvellous persons. But, as Annika was studying and living in a not-to-big city in Denmark, called Aalborg and we had a couple of free days between New Year and the start of the working year, we decided to have a quick trip and visit her.


Rain in Aalborg  map

read more...

2013-12-30 [E] [D]
music,jazz Comments 0

A while ago I listened randomly to When God Created the Coffeebreak by Esbjörn Svensson Trio's, a group previously unknown to me. Fascinated by the distinct playing, I decided to look up more of them, and stumbled upon this gem album.

View on youtube

The Esbjörn Svensson Trio, often abbreviated to e.s.t., emerged in 1993 and was active until 2008, when the pianist Esbjörn Svensson died in a scuba diving accident outside Stockholm. Main influences are Bartók and Radiohead.

Viaticum is the Eucharist that is administered to a dying person.

read more...

2013-11-19 [E] [D]
osx Comments 0

Just some corrections to [http://dingus9.blogspot.be/2013/07/multiple-homebrew-sources.html], and for further reference to myself.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
cd /usr/local/Library
git remote add kde https://github.com/somekool/homebrew.git
git fetch kde
git checkout kde_on_brew/master

# gives an error
brew search okular
# however, this works
brew install okular

# After you've installed your stuff
git checkout master

Thanks, Nick Shobe :)

2013-10-18 [E] [D]
music,jazz Comments 0

One night I got really adventurous on "Tuxedo Junction" and I put in a little "ping!" you know, that wasn't written, and this was such an experience! To make music that wasn't indicated. That really got me into starting to want to think about how to make the music.

-- Bill Evans - The creative process and self teaching

2013-10-14 [E] [D]
programming,code Comments 0

After traveling, I usually have a large collection of photos. To make life a bit more easy, I organize my pictures in collections, with tags.

So far I had done this organizing manually, until I got fed up with it, and created picview.


screenshot.png

I had written a blog post here, but then decided it would be better to write a static project page, and refer you to that page from here :)

So, please view picview page for more details!

2013-10-13 [E] [D]
language,comics Comments 0

James Chapman drew some pictures of what sounds animals make in various languages.

He addresses

read more...

A while ago, the google search page used to have a link in the google bar (that bar at the top) which included a link to perform the current search on scholar.google.com. Then, it suddenly disappeared, which annoyed me quite a bit, as I often just typed my query in google, even though I wanted the scholar one.

So, I just finished a little userscript that just does this: insert a link to google scholar.

It should work in

I will keep this script updated as the google homepage changes (last update: 30th of March 2016)

Download

Read the entire post to view the source.

read more...

2013-08-22 [E] [D]
comics Comments 0

source :)

Listing of these articles
[printer friendly] [static version] [Post listing] [Page listing] [Tags: music tab jazz travel wdb europe code live programming youtube record ]