I often have the following scenario:
– create local repository/branch
– create gitorious project/repository
– push branch to gitorious
This way you end up with your local branch not tracking the remote one. You know you’re not tracking when you have to specify the branch every time you push/pull and when you don’t see how much commits you are ahead of the remote. It is a matter of setting up the correct tracking configuration, something like this for the master branch:
A few years ago, I wrote a small app showing the open network connections (announcement following shortly). I never figured out how to measure transfer rates over the connections since the kernel does not seem to provide this info through the /proc filesystem (only some data queue length which is related to kernel mem usage).
Today we all know and love iftop, but where does it get that info? Simple: pcap! Out of curiosity, I checked out the libpcap docs to see how hard it would be to get started. Turned out to be pretty simple! There are a few excellenttutorials which get you started real fast. In about half an hour I made this very simple sniffer which accumulates the received bytes and packets per second and prints it out when the second changes. Each line contains the timestamp (sec), KB/s and number of packets received in that second. Here you can see me watching a youtube vid 🙂
Opening device eth0
ts = 1285276934, load = 0.7 KB/s (4)
ts = 1285276935, load = 0.3 KB/s (1)
ts = 1285276939, load = 0.9 KB/s (4)
ts = 1285276940, load = 14.4 KB/s (44)
ts = 1285276941, load = 294.9 KB/s (764)
ts = 1285276942, load = 608.9 KB/s (1505)
ts = 1285276943, load = 1164.4 KB/s (2882)
ts = 1285276944, load = 1242.6 KB/s (3064)
ts = 1285276945, load = 1166.6 KB/s (2880)
ts = 1285276946, load = 69.9 KB/s (179)
ts = 1285276947, load = 140.1 KB/s (363)
ts = 1285276948, load = 139.9 KB/s (361)
ts = 1285276949, load = 139.7 KB/s (358)
ts = 1285276950, load = 139.7 KB/s (358)
ts = 1285276951, load = 139.3 KB/s (358)
It is a good test to see if the calculated payload is correct. The initial burst of ~1.2MB/s confirms that. 🙂
If you’re developing on Windows and experiencing DLL hell, Dependency Walker can come in handy.
On linux, you would typically use ldd for that, but a gui can make it a more pleasurable experience, that’s what ElfLibViewer provides. Had to patch it though to make it useful for color-blind people 😉
I discovered just recently that finally, since java 6, you can actually use wildcards in your classpath to include all jars in a dir! This also works in jar manifests!
why does it have to take so long? 😉
The 1989 C standard didn’t allow variable argument macros. They were added in the 1999 standard. To use one according to the standard, plug in “__VA_ARGS__” where you want the variable arguments. For example:
#define print(…) real_print( __VA_ARGS__ , 0)
Of course, your compiler may or may not support either this feature or a nonstandard variation.
You might have guessed that, after all those years, the MS compiler still does not support them!!! arghh. crap.
After looking at all the neat programs Johnny Lee put together, I guess you understand I can’t wait to try this out myself 😉 Also, be sure to check out his blog and numerous videos floating around the web.
First time I heard of the cool wiimote possibilities was when reading a post of Xfennec, in which he made a simple showcase of the possibilities with libwiimote using his favorite 3D engine Raydium. Be sure to check out the vid. I was really impressed back then, but of course Johnny did a lot more impressive stuff, the guy is a legend by now. Johnny does not use the libwiimote lib, but rather the dotnet WiimoteLib (I mention this ref especially for andrasj 😉 )
I have to admit that at first glance the .net lib seems more attractive due to its event based mechanism (internally, it does an async read on a stream in a loop though). The C lib looks a bit more basic but very easy to get started.
I was quite astonished to read about this BUG platform: “an open source, web-enabled, modular software + hardware platform”. This kinda says it all. 🙂 It’s still in beta, but they are targeting Q4 2007 right now to release their BUG-base, the core product, featuring an ARM microprocessor and all kind of interfaces you might desire (notice the MPEG4 HW encoding/decoding support!). Like this featurefest is not enough yet, you can extend the base station with all kind of modules: “GPS, Digital Camera / Videocam, Touch-sensitive Color LCD Screen, Accelerometer, Motion Sensor”, you name it! Before you stop drooling over the hardware specs, save some drool to drool on the software specs. 🙂 They have it nicely running on an OSGi framework! Extension galore. Judging by the screenshots, I have the impression they are running it on the eclipse framework which is an extension of OSGi (Paul, correct me if I’m wrong ;)).
This really seems the ultimate “toy for boys” or “Lego Mindstorms for adults” 🙂 at least in a geeky world 😉
Reminds me of this site/magazine where creating DIY gadgets is just daily routine.. 🙂