Alex Bepple

0 notes &

Sensible settings for reducing file size on Mac

I guess you all know you can reduce the size of a PDF on a Mac via “Save as …” in Preview and then selecting “Reduce file size” as the Quartz filter. The problem with this filter is that it often degrades the image quality to an unusable degree. You can create your own Quartz filter that uses more adequate compression settings.

I was very satisfied with these settings:

  • Image sampling: set resolution to 96 dpi and nothing else
  • Image compression: medium JPEG compression

This shrank a photominutes PDF from 35 to 1.6 MB with hardly any visible loss of quality.

1 note &

Spiegel Online wieder lesenswert

Vor ein, zwei Jahren hatte ich Angst um meine wichtigste Nachrichtenquelle: Spiegel Online. Die Artikel wurden stumpfer, die Rechtschreibfehler nahmen zu, der Mehrwert aus der investierten Zeit ging gegen null. Doch scheint mir, dass sich in der Redaktion etwas verbessert hat. Immer wieder finde ich Artikel, die informativ, orthographisch korrekt und gut geschrieben sind – und glänzen. Zum Beispiel mit Formulierungen wie dieser:

Doch gerade dieses religiös heilsgeschichtlich aufgeladenen Endzustands wegen hat die Utopie von Marx und Engels halbe Generationen fasziniert. (Quelle)

„Halbe Generationen“ – wie viel Sprachwitz und zugleich Bedeutung steckt drin!

Von Angst keine Spur.

3 notes &

Vending machine: put in virtue, get out happiness

Nate: “It’s really fucking lonely. I feel like all I do all day long is manage myself, try to fucking connect with people. But it’s like no matter how much energy you pour into … getting to the station on time or getting on the right train, there is still no fucking guarantee that anyone will be there for you – to pick you up when you get there. – You know what I mean?”

Maggie: “Well, I know that if you think life is a vending machine, where you put in virtue and you get out happiness, then you probably are gonna be disappointed. I know that.”

From: Six feet under, season 5, episode 4

1 note &

More sensible reporting behavior for JBehave 3.0

Going from 2.5 to 3.0, JBehave changed its default reporting behavior – unfortunately, for the worse. Out of the box, JBehave 2.5

  • succeeded and remained silent, if all steps were implemented and passed,
  • succeeded and printed all the steps of a scenario, if at least one step was not implemented – marking that step as pending – and no executed step failed, and
  • failed and printed all the steps of a scenario, if a step failed – marking that step.

JBehave 3.0, on the other hand,

  • succeeds and fails just like JBehave 2.5,
  • but never tells you anything. There is a stacktrace in case of a failure. But who wants to read those? And you get no clue what so ever as to whether there are pending steps.

So how do you make JBehave 3.0 more verbose? You have to change the configuration in your story class:

  1. disable the useless StoryReporterBuilder, that either does not talk at all or at all times – and is not open to extension :( – and
  2. use a default story reporter that only talks when there is something interesting to say.

You can make this setup even more useful by making pending steps fail:

In one team, we have come up with the convention of committing stories in progress with an @Ignore annotation so as not to disturb other people on the team.

When working on the story, you just remove the @Ignore and the policy of failing pending steps prevents you from checking this in – unless you’re done, of course.

Filed under jbehave it-agile-blog-planet

1 note &

Automatically emptying trash on Ubuntu

The most common mechanism for automating tasks on Ubuntu is the cron daemon. You can schedule tasks with crontab -e or you can make your life easier by using Scheduled Tasks, a graphical frontend for crontab. You might need to install gnome-schedule for that.

Now, how do we actually empty the trash? The most commonly recommended way is rm -r ~/.local/share/Trash/files/*. This, however, leaves some garbage in ~/.local/share/Trash/info, where Ubuntu keeps metadata about the contents of the Trash, including the original location and the deletion date. Merely deleting the contents of Trash/files will leave you with orphaned metadata.

A better way is to use the utilities from the trash-cli package:


The best bit is that you can provide empty-trash with a parameter. So

empty-trash 5

will permanently delete all files that have been in the Trash for more than 5 days.

Filed under ubuntu

0 notes &

Converting a Bazaar repository to Git

I keep all of my notes in thousands of plain text files in one directory, and version them using Bazaar. Being fed up with Bazaar’s sluggishness – for instance, it makes me wait a couple of seconds for a simple bzr status – I decided to migrate to Git.

I first tried Tailor because Jeff Hodges was favorably impressed by it. Unfortunately it kept nagging me about some branch parameter. Having a fresh repo as a target, it was not obvious to me how to proceed. So I turned to Google for alternatives.

And so I discovered git fast-import and its Bazaar counterpart, bzr fast-export. This description looked sufficiently straight forward. But in fact it’s even easier. From the Bazaar working tree I did:

sudo apt-get install bzr-fastimport
git init .
bzr fast-export . | git fast-import

This left the working tree dirty, even though it had been clean before. So after

git reset --hard

I was done.

Filed under git bazaar

2 notes &

Natural lighting for your monitor

I used to discard programs that promise natural lighting for computers as something quite out there. Not sure what hit me, but last weekend I decided to give it a try, after reading about a new release of F.lux on Omg Ubuntu. Well, F.lux did not work on my Ubuntu installation at all, but Redshift, an alternative, did.

Now, just a week later, I find any monitor without “natural” lighting irksome. So I encourage you to try it too. If you are on OS X or Windows, go with F.lux, if you are on Ubuntu, I recommend Redshift.

Installing is trivial:

sudo add-apt-repository ppa:jonls/redshift-ppa
sudo apt-get update && sudo apt-get install redshift

Some Redshift tips

redshift is the commandline program, gtk-redshift is its equivalent that sits in the notification area.

Redshift adjusts the lighting according to the time of day. To this end, by default, it asks the clock for your location. If you do not have a clock in your Gnome panel, gtk-redshift fails silently. So get your settings right with redshift first.

You can manually pass a location to Redshift. Find your latitude and longitude here. For Hamburg the parameters are:

redshift -l 53.6:10.0

Redshift has two color temperature settings: one for the day and one for the night. According to the time of day, it adjusts the color temperature on the continuum between the two. I found Redshift’s default temperature for the night to be too dark. You can adjust that too. So my settings look like this:

redshift -l 53.6:10.0 -t 5500K:4400K

Now go add a new entry to Startup Applications and forget all about what you just read.

Filed under ubuntu