Just discovered a nice way to take screenshots of web sites from the command line! No browser needed. Cool.
The tool I’d like to advertise is called gnome-web-photo :
For instance. To take generate an image of my website just call:
Just take a look at binfalse.png to examine the result. I obtained a 1024x6334 image. I guess the main use case is to generate some kind of preview/thumbnail. To get a thumbnail simply add --mode=thumbnail :
Afaik, there is no option to generate a larger thumb, but you could just pass --width= without the --mode=thumbnail . And then crop the pic yourself (e.g. using imagemagick). However, you need to run X and you need to have GTK, if I understand correctly. Nevertheless, I like that solution.
I just needed to record a video stream. Usually, I use mplayer for these kinds of jobs, but this time it failed. However, on the internet I found a way to do it using VLC, which apparently has quite a command line interface.
This comment revealed that the VLC media player comes with some command line magic. Of course, not much is documented in the man page, but the user guide on their website seems to be useful.
Long story short, I ended up with the following command to save the stream http://STREAM.mp4 to /tmp/file.mkv :
It was time to finally replace my old GPG key. I created the key in 2008 and from today’s perspective a 1024 bit DSA key is really weak. Thus, today I decided to move to a new key and created a 4096 bit RSA key.
My old key was
And the new key is:
For those of you who already trust my old key I created a
transition note which is signed by both my old and my new key.
To import my new key to your key chain you can use the following command:
The new key is already signed by the old key. Those of you trusting my old key may verify the signature using:
To sign the new key execute the following command:
And it would be nice if you upload the signed to one of the key servers:
You are of course free to give me a call in order to verify the fingerprint ;-)
The following error occurs when Gajim starts to idle:
This results in a dis- and a subsequent reconnection. As the traceback already suggests the error can be found in /usr/share/gajim/src/common/connection_handlers.py on line 2009. This is the corresponding function:
Obviously, there is no variable obj : The passed argument is called iq_obj …
To fix that mistake just substitute the function definition with (replace iq_obj → obj in line 2006):
This bug is already fixed in their repository (13861:239ec662de5a). Thus, this article is mainly for people not familiar with python/programming, who need a quick fix. (wasn’t able to find something on the Internet)
Btw. I’m not sure why, but this error just affected one of my four machines which are running Gajim.
About 6 or 10 moths ago we were searching for a student to work with us in the SEMS project. In order to reduce the number of applications I started a challenge. To solve this challenge you had to show some understanding for basic techniques and programming languages, so we didn’t waste our time with people not able to write a single line of source code.
And what should I say? It was successful! We’re now a great team with three students :D
However, currently this challenge seems to spread over the internet. And lot’s of people try to solve it (and many submit a wrong answer^^). But even worse, some of you guys try to exploit it by submitting something like
In general I don’t care. It was just some lines of PHP that send me an email in case of a correct answer. There is no database and the worst that can happen is a full inbox, but now I decided to close this challenge and instead forward users to this article.
Thus, if you arrive here feel free to apply for a job! I guess all of my readers, even if they didn’t solve this challenge, are perfect fellows…
MyTinyTodo is a self-hosted todo-list which convinces by its simplicity. It allows to maintain several different lists, you can assign tags, priorities and due dates to certain tasks.
I used it myself for a long time and decided to fork the project in order to implement some stuff I missed in the original version.
I do not intend to talk about MyTinyTodo a great deal. Very tiny, does nothing that isn’t necessary. No Dropbox/Facebook/Instagram etc integration. I really like this kind of software :D
But I was missing an essential feature: Creating tasks via mail.
Lucky us, MyTinyTodo is distributed under the terms of GPLv3 license. Thus, I hg clone d and extended the tool with desired functionality. And since the IDE was already opened I added a tiny authentication (now: username + password; previously: .htaccess ) and secured the API by introducing a signature. Nothing special or complex, but it had to be done.
Long story short: I’m now able to submit tasks via e-mail. That means, a mail containing the following:
will result in something similar to Figure 1. All possible attributes that are recognized in the mail body are listed at the wiki on GitHub.
You can configure the Apache web server to forward requests to Tomcat. Thus, you can speak to both servers on ports 80 or 443 and get rid of the :8080 for your Tomcat applications. I’m somehow doing that very often, so here is small how-to for copy&paste purposes.
As you might know, while Tomcat is Java stuff Apache is written in C. So in general it’s not that easy to get them talking to each other. The key to achieve an integration is called mod_jk (see The Apache Tomcat Connector). So first of all you need to install it:
If it is installed you can configure an AJP worker in /etc/libapache2-mod-jk/workers.properties
As soon as this is done the bridge is ready to close the gap between Apache and Tomcat.
We need to configure an AJP connector on port 8009 . So open /etc/tomcat7/server.xml and add another connector next to the other ones:
If you’re lucky there is already such a connector defined in the comments. So just remove the comment…
Configure Apache to speak through jk
Here I’ll show you how to setup a virtual host. For example, copy the following to /etc/apache2/sites-available/012-yourapp.conf :
Ok, let me shortly explain what I did there.
Everything that arrives at this vhost gets forwarded to our previously defined AJP worker (line 9)
I assume your Tomcat webapp is running on server:8080/YourApp , therefor I configured a substitution of the URL to insert /YourApp (line 7). Of course you need to have mod_rewrite installed and enabled. (You may skip this line if you’re fine with having /YourApp in all your URLs)
The rest should be clear. The vhost is available at http://yourapp.yourserver.tld , as well as at http://ya.yourserver.tld (lines 3&4). You can also use SSL, just configure line 1 to listen at *:433 and add the SSL stuff to the body of your vhost. (SSL exmaple)
Afterwards, enable the vhost to populate it:
Give it a try
If this is done just restart everything:
Now Apache forwards all requests to http://yourapp.yourserver.tld to your Tomcat webapp at http://yourserver.tld:8080/YourApp .
Once again I had to prepare a CV for an application. I’m using the moderncv package to create the CV in and I was always bothered about the title of the document. Today I spend some time to fix that.
Using moderncv you can produce really fancy CV’s with very little effort. But unfortunately, by default it produces an ugly title (see the screenshot taken from Okular). As you can see, there is some character that cannot be displayed by certain tools.
I guess most of my “CV-reviewers” don’t care about this little issue, if they recognize it at all, but it bothers me whenever I have to create a resumé. I already tried to override it using the hyperref package, but wherever I put the statement it seems to have no effect.
However, since moderncv is open source (yeah! lovit) I took a look at the code to see how they produce the title. It was quite easy to find the concerning statement (in my case /usr/share/texlive/texmf-dist/tex/latex/moderncv/moderncv.cls:96 , firstname.lastname@example.org):
As expected the pdftitle contains a double-hyphen that is converted by latex to a dash. Apparently a problem for some programs. To fix this issue you could sudo:modify this file, but that’s of course messy. Better add something like the following to the end of the header of your document:
This will override the broken output of the package.