I decided to combine these two problems into one solution:
- Modern CPUs are idle way too much of the time. Why have all this computational power if we don’t use it?
- I have these funny old Quake demos that there’s no good way to convert to something playable.
My solution is to convert Quake .dem files to .pov files and render them with POV-Ray.
Update: New better screenshot:Read the rest of this entry »
Go has exceptions and return values for error
Yes it does. Yes, it really really does.Read the rest of this entry »
To properly compile a static C++ binary on Linux you have to supply
-static-libstdc++ when linking.
It said that unlike Arping 2.09, in Arping 2.11 the ARP cache was not updated after successful reply. I thought that was odd, since there's no code to touch the ARP cache, neither read nor write. Surely this behaviour hasn't changed?Read the rest of this entry »
If you split up code into different libraries you can get a diamond dependency problem.
That is you have two parts of your code that depend on different incompatible versions of the same library.
Normally you shouldn't get in this situation. Only someone who hates their users makes a non backwards compatible change to a library ABI. You don't hate your users, do you?Read the rest of this entry »
As you remember from long ago hashes are
O(1) best case, but can be
if you get hash collisions. And if you're adding
n new entries
I thought I'd take a look at the hash_set/hash_map GNU C++ extension.Read the rest of this entry »
This is a short howto on setting up TPM-backed SSL. This means that the secret key belonging to an SSL cert is protected by the TPM and cannot be copied off of the machine or otherwise inspected.
Meaning even if you get hacked the attackers cannot impersonate you, if you manage to kick them off or just shut down the server. The secret key is safe. It has never been outside the TPM and never will be.
This can be used for both client and server certs.Read the rest of this entry »
Yubico and their products are awesome.
That pretty much sums up this blog post but I'm going to go on anyway. If you're thinking of introducing two-factor authentication to your company, or you're using something that's fundamentally broken (like RSA SecureID) you simply must at least take Yubikeys into consideration.Read the rest of this entry »
gettimeofday() and time() should only be used to get the current time if the current wall-clock time is actually what you want. They should never be used to measure time or schedule an event X time into the future.Read the rest of this entry »
I've started writing a replacement for SSH.
Why? Because SSH has some drawbacks that sometimes annoy me. I also wanted an authentication scheme that's more similar to SSL/TLS than what SSH does.
With tlssh you don't specify username or password, you simply connect to the server using a client-side certificate to log in as the user specified in the certificate. No interaction until you reach the shell prompt on the server.Read the rest of this entry »
Arping 0.1 was released 10 years ago last month or so. It's since been included as a package in Debian GNU/Linux, Ubuntu, OpenBSD, FreeBSD and NetBSD, Gentoo and some other smaller and bigger OSs and distributions.Read the rest of this entry »
Yes clipboard, not keyboard. I've made a clipboard sniffer for X called ClipSniff.
It periodically saves whatever is in the clipboard (both the "PRIMARY" and the "CLIPBOARD") into a sqlite database.Read the rest of this entry »
So I killed three birds with one stone. I made Lightwave. It's like Google Wave only:
- More incomplete
- Written in Erlang
I was recently asked why autotools was so good. I thought I might as well post what I answered.Read the rest of this entry »
I've always wanted to be able to move a process from one terminal to another. For example if I've started a long-running foreground process (such as irssi or scp) outside of a screen and I have to log out my local terminal. I looked around and there doesn't seem to be any way to do this.Read the rest of this entry »
I'm trying to force a program not to buffer its output to stdout. Any program, all programs. It can't involve changing the source code or depending on weird or unportable stuff.
It should be possible. It seems like I'm missing something obvious, but I can't figure out what.Read the rest of this entry »