Precursor

So for the past weeks I have been experimenting a lot with sleep and how to optimize it.

I briefly tried various Everyman and Uberman schedules most importantly uberman which went ok for a few days and then had me crash by oversleeping due to SWS deprivation and after that Everyman 3 with a 3 hour core and 3-4 naps 20 min naps. during the day.

This worked out ok however still meant a lot of time wasted and me feeling not 100% top of my game.

Now things changed after receiving a Zeo for xmas allowing me to get proper feedback and data on my sleep cycles. So for the last few days I have been mostly sleeping monophasic collecting data on how my circadian rhythm appears to work.

Deep is mostly handled in one block in the first 1.5-3 hours of the night (fragmentation seems to be affected by alcohol consumption)

Based on this I decided to, instead of trying to adapt to some made up schedules, adapt my schedule to my already existing rhythm. I also didn't want to eliminate deep sleep completely (as would be done with an uberman cycle of 6x 20 min. naps a day).

So after examining the data I figured why not try to split up the core into 2 parts:

Deep Core: 01:30-03:00 with mostly deep sleep and a little REM

REM Core: 06:00-07:00 with mostly REM

Add in 2-3x 20min naps during the day depending on how I feel and need them

In theory this should have no sleep deprivation and adaption symptoms at all as I would cover SWS deprivation by still getting deep sleep plus my I would probably end up getting more pure REM time than on a regular e3 schedule.

Deep Core

So I went ahead with my plan and first made sure to get a maximum of deep sleep by using all the knowledge I acquired that could possibly aid me in my task:

This especially involves one hour before having my Deep Core:

Turning all lights off and avoiding bright lighs to get melatonin production going

Activate Redshift on my pc to dim the PC monitors and putting on sunglasses

Drinking a 200mg Magnesium tab

Switch to calm Music (selected tracks from NIN's Ghost I-IV)

30 min. before hitting the bed I additionally

Have a hot shower to raise my body core temperature and

Cooling down my sleeping room in the meantime

I will then lay in bed for 15 min. reading with socks on and the window still open to cool the room and my body further down, while the blanket is only covering my feet to keep those warm. The effect of a decrease in body core temperature while keeping the extremities (hand/feet) warm induces sleepiness and should decreasethe time needed to hit deep sleep.

At ~01:30am I put on a sleeping mask and the zeo headband. I keep the socks on however I do sleep with the blanket covering my whole body then. Via relaxing/proper breathing and some speed meditation I am usually able to fall asleep in 5 minutes max. (it usually takes me about 2 min.)

REM Core

Now for the REM Core, in order to maximize the potential REM time I set the alarm to 07:20 with a smart wake window of 30 min. In theory the smartwake should wake me up as soon as I exit REM which should, based on my calculations, happen somewhere at 07:00.

I hit the bed at ~06:00 with the target of ~ 1hour of sleep with a maximum of REM.

In order to ensure proper REM sleep I do most of the things the same as I did before the Deep Core (cooling the body down, listening to calm music and no lights)

Results: First night

Everything went better than expected. Will see how the day goes by but I am already satisfied that everything went exactly as predicted.

We shall see if this turns out to be a sustainable long term solution. I will update the post later this day once the majority passed and I had some naps to comment on.

I got inspired todo some wacom sketching again and wanted todo something olboy related in a Frank Miller inspired style – I got a little wild in the end and wandered of the Frank Miller style, apart from that I am not completely happy with how it turned out but it's ok I guess, I'll definitely do something oldboy related again tho

So my plan was to use squeezeslave on a nslu2 slug with a terratec 7.1 usb soundcard and my old 5.1 soundsystem to play music in my bathroom (front left/right), the anteroom/hallway (rear left/right) and the toilette (center).

Now after fiddling a while and finding out that etch doesn't even have the surround51 preconfigs, I upgraded to debian lenny and FINALLY came up with an asound.conf which does what I want.

Only thing I might improve on is getting the mixing of left/right for the center channel to work, and possibly some filtering for the subwoofer – however I am not exactly sure if that's a good idea given the limited cpu power of the slug.

Anyways here's the asound.conf – note that squeezeslave refuses to work without a sample rate of 44100.

upmix output is outputting the stereo signal to all channels, the rest is for adressing/splitting between individual channels.

So i.e. you could run one application outputting to the frontspeakers and one to the rear.

Thanks to some guy on the internet (i am sorry I can't find the link anymore) for the asound.conf I based this on (it had everything apart from the combined upmix output)

In terms of HDDs I am going to go with Western Digital Caviar Green 2000GB, 64MB Cache, SATA II for ~ 60 € a piece.

I ripped all the HDDs out of the old mediacenter (1x 60 gb SSD, 1x 1 TB 3.5" and 1x 2 TB 3.5" plus another external 1.5 TB) and put them into the new server, a quick power consumption check showed ~ 35 Watt which is perfectly fine.

I might do some more accurate power consumption tests later on but the results so far look good.

Last but not least I got the original Zotac Board up and running again by:

Having switched to a mysql DB backend for xbmc before removing the HDDs (see this guide)

Installing XBMC live on an USB Stick and fixing up the settings to connect to the mysql DB of the homeserver.

Setting up the xbmc live install so that all the media (which is now located on the home server) gets mounted at exactly the same spots they were before (using NFS)

Make sure to also nfs mount the userdata/Thumbnails folder to avoid having to store/download artwort and stuff in case you want to add more pcs running xbmc.

Everything works pretty flawless so far, 1080 playback over WLAN is also 100% smooth.

I might go back and edit this post to make it more detailed and clearer but it should be fine for now. Feel free to drop me an email if you have any questions.

Originally posted over here http://twister.tim-perry.co.uk/blog/2010/02/20/PhoneGap_and_Netbeans the link was down (Google Cache to the rescue :).
Just want to make sure this doesn't get lost. Thanks Tim!

Note: I just did a cheap copy+paste here, if the url above works for you I would advise you to check the original article!

PhoneGap and Netbeans

We've recently been looking at writing apps for phones (it's tough to resist a bandwagon), and we found PhoneGap. It's a framework that lets you write apps for most of the big phone platforms (iPhone, Android, Blackberry etc) in nothing but HTML and JavaScript, and still get at things like the camera. I haven't got far enough with it to really judge it yet because it's made to be used in Eclipse, when I actually really wanted to code in NetBeans, and setting that up is a right hassle. After doing that, I figured the internet might want this answer too.

If you're writing phonegap stuff it's generally easiest to make separate projects for each platform, write the one platform and then pass out the HTML/JS to the others, and write each native bit separately. With this in mind the following instructions are for setting up a Android project, but I imagine it's not too difficult to work out the iPhone steps. At least, I hope so, I'm going to have to do it at some point.

Download and set up the Android SDK. Instructions are all on that page, you can ignore the Eclipse stuff, you need to do the platform stuff.
Download phonegap (I'm using 0.8) and extract it.
Build phonegap. This didn't work for me, so I followed the instructions here. Essentially there are a few typos, and you need to put two semicolons in the right places.
Copy the [phonegap dir]/lib/android/phonegap.js (or min.js, or both) to [phonegap dir]/android/assets/www.
Install nbandroid, a NetBeans plugin for android projects.
By this point you've got all the bits you need to get everything working, and it's just a matter of getting a project made and building in NetBeans. Essentially you make a NetBeans android project, and then splice it together with the [phonegap dir]/android folder:

Make a new android project somewhere, through NetBeans.
Copy the res folder from phonegap/android over the res folder NetBeans just made, and build the NetBeans project. This should create a new R.java
Copy the phonegap/android/src folder over the src folder NetBeans made.
Inside NetBeans go to the Projects window -> Source Packages -> com.phonegap.demo, select all the files, right click and go to Refactor -> Move. Move them into the package that the rest of your project is in.
Copy the libs, assets and AndroidManifest.xml from phonegap/android to the NetBeans project.
Add the jar in the libs folder you just copied to the libraries of the NetBeans project.
Run the Android SDK Manager program and make a new Virtual Device.
At this point the project should build, and running it should start an emulator up, and eventually try and run the demo program. Unfortunately, the demo program will only come up with '…index.html file not found', or similar, because NetBeans doesn't correctly tell the Android SDK to get the Assets from the Assets folder you copied and put the in the apk (Android app package). To fix:

In your NetBeans project open nbproject/build-impl.xml and change the line saying '' to ''
Go into nbproject/project.properties and change 'assets.dir=' to 'assets.dir=assets'. En route, add 'assets.available=true'
Enjoy!

Awesome, just wanted to quickly post additional stuff to the basic checkout the boblight code, ./configure make, make install steps:

Some of the boblight tools look for libboblight.so in /usr/lib/ however its copied to /usr/local/lib/ by default so to resolve this symlink it:

ln-s/usr/local/lib/libboblight.so /usr/lib/libboblight.so

Next we need a proper atmolight.conf in /etc/ I used the one provided by carsten for the windows version minus the parameters the latest build complains about.
Don't forget to change the output on your end (its going to be /dev/ttyUSB0 unless you have some other serial USB stuff connected to your mediacenter).