$ shnsplit -o 'cust ext=ogg oggenc - -o %f' \
-f CDImage.cue -t "%n.%p - %a - %t" \
CDImage.ape
$ cuetag CDImage.cue *.ogg
If you’re on Ubuntu, you’ll need to install cuetools and shntool. To split ape, compile and install this port of mac.
ape/flac with cue into oggs on Linux
$ shnsplit -o 'cust ext=ogg oggenc - -o %f' \
-f CDImage.cue -t "%n.%p - %a - %t" \
CDImage.ape
$ cuetag CDImage.cue *.ogg
If you’re on Ubuntu, you’ll need to install cuetools and shntool. To split ape, compile and install this port of mac.
De Radboud Universiteit censuurt onder het mom van een duidelijke scheiding tussen intern en extern nieuws sinds kort het niet-meer-onafhankelijke blad de Vox.
Gelukkig kunt u het nieuws alsnog lezen op RU Nieuws. Op deze site wordt al het interne nieuws gelekt.
For a project I need to store blobs of data (~10MB) and access them over TCP. I don’t need any features like removing, updating, authentication, statistics or replication: it’s simply not required or already handled by some other part of the project.
I only want to be able to store a blob and receive a key for it; retrieve a blob by its key and list all keys of the blobs stored.
I couldn’t find anything that fit it. Thus I created bertha. Lets delve right into it, shall we:
To run the server:
./berthad-vfs 0.0.0.0 1234 tmp data
There’s a python client
>>> from bertha import BerthaClient
>>> c = BerthaClient('serf', 1234)
>>> list(c.list())
[]
>>> key = c.put_str('Hello world')
>>> key
'64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c'
>>> c.get(key).read()
'Hello world'
>>> list(c.list())
['64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c']
>>> ctx = c.put()
>>> ctx.f.write("Do some")
>>> ctx.f.write("Streaming")
>>> ctx.finish()
'975001fb9bdc0f72a78ca6326c55af86348d4c84da7ba47b7ed785a03f6803b0'
>>> c.get('975001fb9bdc0f72a78ca6326c55af86348d4c84da7ba47b7ed785a03f6803b0').read()
'Do someStreaming'
Which also install a bertha commandline tool:
$ bertha list
975001fb9bdc0f72a78ca6326c55af86348d4c84da7ba47b7ed785a03f6803b0
64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c
$ bertha get 975001fb9bdc0f72a78ca6326c55af86348d4c84da7ba47b7ed785a03f6803b0
Do someStreaming
$ echo Hi | bertha put
c01a4cfa25cb895cdd0bb25181ba9c1622e93895a6de6f533a7299f70d6b0cfb
$ bertha get c01a4cfa25cb895cdd0bb25181ba9c1622e93895a6de6f533a7299f70d6b0cfb tmp
$ cat tmp
Hi
The berthad code is pretty small: at the moment under a thousand lines of C with lots of comments. GETs are pretty fast: berthad uses Linux’ splice syscall, which usually makes the network card read directly from the buffer the harddisk wrote to.
When I try to set the displaymode of my external monitor to 1024×768@60 the preferences application doesn’t listen properly and sets it to 1024×768@120, which my monitor does not support. This seems to be a bug in the developer preview.
To remedy this bug, I wrote a simple commandline tool to set displaymodes in Mac OS X. It’s on github.
On the developer preview of Lion, the “+” button for 802.1X profiles was removed.
You can use the iPhoneConfigurationUtility application (Google for it) to create a mobile configuration profile with the 802.1X settings, that also imports perfectly fine on Lion.
Simply install from Subversion.
I have some remarks on Steve Jobs’s “Thoughts on Flash”.
Dear readers,
I’m looking for an apartment in the neighborhood of Nijmegen. I’m not picky, but can’t afford more than €300,- in total per month.
Contact me per e-mail (bas@this domain).
Bas
Update I’m settled!
This week, various student organisations protest against major cuts in the funding of education and research.
A reader of dutch, can visit their site.
As pointed out by Jorg Kennis, Twitter‘s new lists feature make it hard to determine the amount of unique followers. I’ve written a simple script, using a slightly modified TweePy, to determine the amount of unique followers.
Example usage:
bas@w-nz ~/twitter-unique-followers $ python twitter-unique-followers.py JorgK -ubwesterb
Password:
rate_limit_status: remaining_hits: 112
Jorg Kennis
followed directly by 182
in lists
RPtje/vriendenbekenden subscribed to by 0
JorgK/TechNL subscribed to by 0
sentfanwyaerda/nijmegen1 subscribed to by 9
JorgK/Friends subscribed to by 0
sjorsjes/Community subscribed to by 0
robinspeijer/iPhone subscribed to by 1
nielsschooneman/iPhone subscribed to by 0
JeanPaulH/iPhoneclub subscribed to by 5
number of unique followers: 198
You can download it here. I could write a simple webpage with the same functionality, if anyone would mind.
Normul normalizes URLs. It expands shortened URLs:
>>> from normul import normul
>>> normul('http://bit.ly/1I4VQ')
{'type': 'other', 'normalized': 'http://www.shinguz.ch/MySQL/mysql_mv.html', 'original': 'http://bit.ly/1I4VQ'}
And shows useful links for hosted-images:
>>> normul('http://yfrog.com/6c5krj')
{'image': {'full': 'http://img228.imageshack.us/img228/1079/5kr.jpg', 'thumbnail': 'http://img228.imageshack.us/img228/1079/5kr.th.jpg'}, 'type': 'image', 'original': 'http://yfrog.com/6c5krj', 'normalized': 'http://yfrog.com/6c5krj'}
You can find the simple but convenient sourcecode here.
Given a set of countable sets
, such that
is totally ordered by inclusion, videlicet for every
either
or
. Intuitively, for at every step in this chain one element at least must be added, one expects the set
to be countable as well.
Suppose
is countable. Then the union,
is a countable union of countable sets, hence countable. (Suppose
is an enumeration of
and
enumerations of the elements of the chain. Then
enumerates
.)
Thus
is an upper bound of
. In the poset of countable subsets of some set
, of which
is a subset, every non-empty chain has an upper bound. Hence, using Zorn’s lemma there is a maximal element, say
.
Suppose
is uncountable, then there exists a
.
is most definitely also countable and
which contradicts
‘s maximality. We are forced to conclude that there exists an uncountable chain of countable sets.
Cantor’s set theory keeps surprising.
Update: an example of such a chain is the set of the countable ordinals.
Another update: a “more concrete” example are the downsets in
without the empty set and
itself. These downsets correspond to real numbers, see Dedekind Cuts.
Although I don’t bear any animosity against most dutch loanwords (except those Anglo-Saxon), the dictionary of the dutch Bond tegen Leenwoorden is a true joy to read.
Since yesterday I, for the first time, enjoy the anything-but-special age of 21 years.
Windows 7 Sins. I strongly agree with points 1, 3, 4, 5 and 6. The arguments for points 2 and 7 are a bit weak, but I do agree with the conclusions.
For the non US audience, it would have been nice to note that if Microsoft (or the US) would recall all foreign licenses for Windows, our entire government is crippled.
were both victim of a DDoS today. Silently, I always hoped that a really long-lasting one will convince them to put effort in a distributed scheme.
Maybe I should be waiting for another Wave.
At the faculty for sciences there are canteens for students. In each of these, there’s sound equipment connected to linux boxes. On each of those linux boxes, we run a music-request-server called Marietje. I just finished writing a front-end in Javascript. It wasn’t a pain. As instead, the use of jQuery was a bliss.
The frontend for one of those boxes and the source code (see the ajax folder).
When I wanted to react to any changes to a input textbox immediately, my first instrinct was to use onChange. onChange, however, is called when the input loses focus. onKeyPress then? Isn’t called on backspaces. onKeyDown, maybe? It does get called, but the effect of the keystroke isn’t yet applied, for the return value determines whether it that is done in the first place. (Same story for onKeyPress by the way.) onKeyUp does work a bit, except if someone is holding down a single key, for a while.
The solution: hook onKeyUp and use setTimeout with a timeout of 0. Yugh. I hate DOM.
Big Fat Disclaimer: I actually tested this only on one browser.
When I want to generate usernames from real names, which can contain non-ascii characters, you can’t simply ignore the unicode characters. For instance, danielle@blaat.org is the right e-mail address for Daniëlle, danille@blaat.org isn’t.
There’s trick. Unicode has got a single code for ë itself, but it has also got a code which (simplified) adds ¨ on top of the previous character. The unicode standard defines a normal form in which (at least) all such characters, which can be, are represented using such modifiers. If you then simply ignore the non-ascii representable codes, you’ll get the desired result.
In python: unicodedata.normalize('NFKD', txt).encode('ASCII', 'ignore').
However, this isn’t the right solution. For instance, in german, one prefers ue as a replacement of ü over u.