• Home
  • About
  • Wacom Sketches
  • Photoshop Stuff
  • Bruce – The Gaywalker

Optimizing my sleep

Posted in bodyhacking by christoph
Dec 28 2011
TrackBack Address.

(Note: this post ist WIP 28/12/11)

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.

Now my experimental e3 schedules involved (despite the fact that the naps aren't equidistant):

  • Core 01:30-04:30
  • Nap at 05:30
  • Nap at 08:30
  • Nap at 19:00
  • Nap at 22:00

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.

Concerning the charts: (light green=REM, dark green=Deep, grey=Light, Red=Wake) – each bar shows a 5 min. range.

24.12.2011 - Monophasic Core with a glass of wine at dinner

25.12.2011 - Monophasic core with 2 naps (one regular one long)

26.12.2011 - Mono with alarm waking me up every 90 min.

My assumptions proved to be  correct (~90 min. cycles, hitting REM on naps) and additionally I discovered things I wasn't fully aware of yet.

  • I am getting lots of REM
  • I am getting about an hour in one block during the morning hours
  • 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:

  1. Turning all lights off and avoiding bright lighs to get melatonin production going
  2. Activate Redshift on my pc to dim the PC monitors and putting on sunglasses
  3. Drinking a 200mg Magnesium tab
  4. Switch to calm Music (selected tracks from NIN's Ghost I-IV)

30 min. before hitting the bed I additionally

  1. Have a hot shower to raise my body core temperature and
  2. 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.

28.12.2011 Total Sleep: 2h17min | Deep 44 min | REM 1h22min | Light 11min | Wake: 1min

Deep Core:  Zeo alarm set to 03:15 + Wakewindow of -30min*.

Actual sleep time clocked in at 01:15 min. from 1:26-2:50.

REM Core: Zeo alarm set to 07:15 + Wakewindow of -30 min*.

Actual sleep time clocked in at 01:02 min. from 05:55-6:59am

*Zeos smartwake window allows you to setup the zeo so that the alarm may go off a maximum of x min. before the intended wakeuptime should an ideal opportunity present itself (= just leaving REM).

No Comments yet »
Tagged as: bodyhacking, polyphasic, sleep, zeo

August Doodle

Posted in Uncategorized by christoph
Aug 17 2011
TrackBack Address.

No thinking no erasing 10 min. max – just free flow drawing whatever hits your mind, the key is not stoping but just drawing whatever – even if it makes no sense :D

Good music helps too, I just discoverd Two Door Cinema Club and was listening to it while drawing – good stuff if positive energetic music is your thing :)

Random Doodle August 2011

Random Doodle August 2011

No Comments yet »

Where is my mind?

Posted in Uncategorized by christoph
Aug 16 2011
TrackBack Address.

So after watching Suckerpunch (which featured a pretty cool cover version of where is my mind) and currently reading Fight Club I got inspired todo yet another fight club based artwork.

Also after mypaint crashing and almost loosing 80% of the progress on the pic I took it as a sign and stopped working on it.
It's far from perfect and I might revisit it later and do some corrections and ink it.
Btw. Images with mirrors are a pain in the ass to draw (I did fuck up concerning some perspective issues but whatever :P )
Also the image has an original resolution of 6299×5466 so I had to seriously crunch it down to even be able to upload it :P
Fight Club - Where is my mind?

Fight Club - Where is my mind?

No Comments yet »

Donnie Darko

Posted in Uncategorized by christoph
Aug 15 2011
TrackBack Address.

So after watching Donnie Darko (yet-again) yesterday I got inspired to do some Darko related doodling.

I couldn't be bothered to ink it so live with it :P

Donnie Darko

Love or Fear? Which path do you choose?

No Comments yet »

Oldboy Sketch Frank Millerish

Posted in Uncategorized by christoph
Aug 14 2011
TrackBack Address.

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 :)

Oldboy Sketch

No Comments yet »

alsa asound.conf 7.1 upmix debian lenny

Posted in Home Automation, nslu2, smarthome by christoph
Jul 17 2011
TrackBack Address.

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)

pcm.dshare {
	type dmix
	ipc_key 2048
	ipc_key_add_uid false # let multiple users share
	ipc_perm 0660 # IPC permissions (octal, default 0600)
	ipc_gid audio
	slave {
		pcm "hw:0,0"
		rate 44100
		format S16_LE
		period_time 125000
		period_size 6000
		buffer_size 24006
		channels 8
	}
	bindings {
		0 0
		1 1
		2 2
		3 3
		4 4
		5 5
		6 6
		7 7
	}
}
 
pcm.upmix {
	type plug
	slave {
		pcm "dshare"
		channels 8
	}
	ttable.0.0 1
	ttable.1.1 1
	ttable.0.4 1
	ttable.1.5 1
 
	ttable.0.2 1
	ttable.1.3 1
 
	ttable.0.6 1
	ttable.1.7 1
}
 
pcm.frontx {
	type plug
	slave {
		pcm "dshare"
		channels 8
	}
	ttable.0.0 1
	ttable.1.1 1
}
 
pcm.centersub {
	type plug
	slave {
		pcm "dshare"
		channels 8
	}
	ttable.0.2 1
	ttable.1.3 1
}
pcm.rearx {
	type plug
	slave {
		pcm "dshare"
		channels 8
	}
	ttable.0.4 1
	ttable.1.5 1
}
 
pcm.sidex {
	type plug
	slave {
		pcm "dshare"
		channels 8
	}
	ttable.0.6 1
	ttable.1.7 1
}
No Comments yet »
Tagged as: debian, multiroom audio, nslu2, slug, smarthome, squeezeslave

Split media center into mediaplayer and homeserver

Posted in Home Automation, smarthome, xbmc by christoph
Jul 10 2011
TrackBack Address.

So after moving into my new apartment I had to restructure my network/infrastructure.

In my old apartment my whole media center/server setup was one pc. A Mini ITX Zotac ION Board with a few HDDs, an SSD and running 24/7.

My requirements were simple:

    1. Low power usage
    2. Room for 6 HDDs
    3. Small

Silent wasn't really a requirement since the server will run in a small cabinet/server room.

Due to the low power requirement a mini-itx atom based motherboard seemed like a good choice.

I found a pretty kickass board from Supermicro, offering all I could wish for including 6 sata ports integrated IPMI, KVM and 2x Gigabit ethernet ports.

I added 4 Gb of RAM an Antec EA-30D Green PSU (of course 80 plus certified) and bought a Mini-ITX LIAN LI PC-Q08B Case which fits 6x 3.5", 1x 5.25" and an additional 2.5".

http://www.lian-li.com/v2/en/product/product06.php?pr_index=480&cl_index=1&sc_index=25&ss_index=63&g=spec

So the list of stuff comes down to this:

  • Supermicro X7SPA-HF Motherboard ~170€
  • EA-380D Green PSU ~47 €
  • Lian Li PC-Q08 ~100€
  • 2x 2GB Ram DDR-2, 667 MHz, KINGSTON ~60€ for both

So thats 377€ for everything but the HDDs.

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:

  1. Having switched to a mysql DB backend for xbmc before removing the HDDs (see this guide)
  2. Installing XBMC live on an USB Stick and fixing up the settings to connect to the mysql DB of the homeserver.
  3. 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)
  4. 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.

No Comments yet »

HOWTO: Netbeans and Phonegap

Posted in Uncategorized by christoph
Apr 16 2011
TrackBack Address.

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!

1 Comment »

Atmolight + XBMC + Ubuntu

Posted in Uncategorized by christoph
Mar 25 2011
TrackBack Address.

Finally received my atmolight stuff by http://atmolight.de/

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).

[global]
interface	127.0.0.1
port		19333
 
[device]
name		ambilight
type		atmo
output		/dev/ttyUSB2
rate		38400
channels	15
interval	16000
prefix		FF
 
[color]
name		red
rgb		FF0000
gamma		1.0
adjust		1.0
blacklevel	0.0
 
[color]
name		green
rgb		00FF00
gamma		1.0
adjust		1.0
blacklevel	0.0
 
[color]
name		blue
rgb		0000FF
gamma		1.0
adjust		1.0
blacklevel	0.0
 
[light]
name		left
color		red 	ambilight 4
color		green 	ambilight 5
color		blue 	ambilight 6
hscan		0 50
vscan		0 100
 
[light]
name		right
color		red 	ambilight 7
color		green 	ambilight 8
color		blue 	ambilight 9
hscan		50 100
vscan		0 100
 
[light]
name		top
color		red 	ambilight 10
color		green 	ambilight 11
color		blue 	ambilight 12
hscan		0 100
vscan		0 50
 
[light]
name		bottom
color		red 	ambilight 13
color		green 	ambilight 14
color		blue 	ambilight 15
hscan		0 100
vscan		50 100

Now start the daemon

sudo boblightd

Next in order to get the light color to match the display you need to run boblight-X11.
I currently run it with the following parameters which appears to look good to me

boblight-X11 -o saturation=2.5 -o value=10 -o threshold=20 -o use=1 -o interpolation=1 -o autospeed=1

If you want more intense colors tweak the saturation value to your desire.

If you experience random blinking/flashing of the rgb stripes and use an nvidia card make sure to disable flipping @ the nvidia-settings

I only spent an hour setting everything up and getting it working since its friday and I obviously need to head out soon but this shall do for now :)

No Comments yet »

SASS – creates compile dir instead of working the way it should

Posted in Uncategorized by christoph
Feb 08 2011
TrackBack Address.

Quick note from me as I am playing around with sencha touch and sass a little.

In order to compile the sass files,

compass compile

Resulted in generating a compile folder and not recompiling or considering the config.rb file at all.
Solution as hinted here is to add it to call it directly or add it to the PATH thus doing:

/var/lib/gems/1.8/bin/compass compile

while inside the folder with the config.rb and the .sass file – finally resulted in a proper compile.

1 Comment »
Next page »

Recent Posts

  • Optimizing my sleep
  • August Doodle
  • Where is my mind?
  • Donnie Darko
  • Oldboy Sketch Frank Millerish

Other Projects

  • Nosferatu

Tags

bodyhacking conrad eier debian home automation How to linux lirc maverick media center multiroom audio nslu2 nvidia polyphasic problem sleep slug smarthome squeezeslave ubuntu upgrade usb-uirt zeo
Powered by WordPress