This is old, from December 2010 it seems, but it's here in case the machine goes titsup. Quick, dirty and ugly but it works most of the time. First, the capture program:
#include <libusb-1.0/libusb.h>
#include "libfreenect.h"
#include "libfreenect_sync.h"
#include <stdio.h>
#include <stdlib.h>
/*
No error checking performed whatsoever; dealing with it later (or not).
*/
int main(int argc, char** argv)
{
uint16_t * depth = (uint16_t *)malloc(FREENECT_DEPTH_11BIT_SIZE);
uint32_t timestamp;
int index = 0;
freenect_depth_format fmt = FREENECT_DEPTH_11BIT;
uint8_t * depth8 = (uint8_t *)malloc(FREENECT_FRAME_PIX);
int i;
/* Capture one Kinect depth frame */
freenect_sync_get_depth(&depth, ×tamp, index, fmt);
/* Convert captured frame to an 8-bit greyscale image */
for(i = 0; i < FREENECT_FRAME_PIX; i++) {
depth8[i] = (2048 * 256) / (2048.0 - depth[i]);
}
/* Write raw greyscale image to stdout */
fwrite(depth8, FREENECT_FRAME_PIX, 1, stdout);
return 0;
}
(Don't know if it's the Suffusion theme or what that kill all the newlines from these listings. They're there, I can assure you, they're just not visible.)
Do not use swap; this may be overly cautious these days as the drives have fancy wear-leveling schemes and whatnot implemented but still, if you're not tight on memory then it should not hurt. And if memory is an issue then in order to avoid performance problems perhaps you should upgrade it in the first place.
Do use the "noop" I/O scheduler, i.e.
apt-get install grub
add GRUB_CMDLINE_LINUX="elevator=noop" to /etc/default/grub
update-grub
after boot, /sys/block/sda/queue/scheduler should read "[noop] anticipatory deadline cfq"
That last part about the scheduler ensures that the default disk I/O scheduling, which rearranges reads and writes to boost IOPS for traditional cylindrical platters and is therefore just bad for SSD performance, is not used. With the "noop" scheduler, reads and writes happen in order.
Performace-wise, setting up Amazon CloudFront ("Custom Origin") in addition to WP Minify and WP Super Cache improved site response times a lot. Offloading static content to Amazon not only made those offloaded files load faster (because of Amazon's faster tubes) but this also reduced stress on our feeble-ish server on page load so that the document itself is returned faster. Load time is also more repeatable. Good stuff!
Note that CloudFront makes HTTP/1.0 requests and Apache may take some convincing in order to make it Gzip the 1.0 response.
driftfile /var/lib/ntp/ntp.drift
statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
# From http://support.ntp.org/bin/view/Servers/StratumTwoTimeServers
# each of these ISO: FR, Notify?: No
server ntp1.kamino.fr iburst
server ntp1.doowan.net iburst
server ntp.duckcorp.org iburst
server itsuki.fkraiem.org iburst
server time.zeroloop.net iburst
restrict 127.0.0.1
restrict ::1
restrict default kod notrap nomodify nopeer noquery