<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Softcore software development &#187; sleep</title>
	<atom:link href="http://tea.cesaroliveira.net/archives/tag/sleep/feed" rel="self" type="application/rss+xml" />
	<link>http://tea.cesaroliveira.net</link>
	<description>It&#039;s all about the cycles</description>
	<lastBuildDate>Tue, 24 Jan 2012 04:31:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Waking up your computer at a certain time</title>
		<link>http://tea.cesaroliveira.net/archives/379</link>
		<comments>http://tea.cesaroliveira.net/archives/379#comments</comments>
		<pubDate>Fri, 23 Dec 2011 04:39:09 +0000</pubDate>
		<dc:creator>Cesar</dc:creator>
				<category><![CDATA[Living]]></category>
		<category><![CDATA[alarm]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[sleep]]></category>

		<guid isPermaLink="false">http://cdolivei.webfactional.com/?p=379</guid>
		<description><![CDATA[The goal of my alarm clock website was to actually be my alarm clock. For this to happen, I thought I would need to have my computer running all night long which seemed like a waste of electricity. It turns out, you can schedule your computer to wake up at a certain time by using [...]]]></description>
			<content:encoded><![CDATA[<p>The goal of my <a href="http://sunshine.cesaroliveira.net/" onclick="pageTracker._trackPageview('/outgoing/sunshine.cesaroliveira.net/?referer=');">alarm clock website</a> was to actually be my alarm clock. For this to happen, I thought I would need to have my computer running all night long which seemed like a waste of electricity. It turns out, you can schedule your computer to <a href="http://www.vistax64.com/tutorials/166809-task-scheduler-wake-up-computer.html" onclick="pageTracker._trackPageview('/outgoing/www.vistax64.com/tutorials/166809-task-scheduler-wake-up-computer.html?referer=');">wake up at a certain time by using the task scheduler</a>.</p>
<p>So now I have it wake the computer up at 7:50 so that in 5 minutes it can play the <a href="http://en.wikipedia.org/wiki/Nightingale" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Nightingale?referer=');">nightingales</a> before playing the <a href="http://soundcloud.com/dubology-2/dubology-good-morning-dub" onclick="pageTracker._trackPageview('/outgoing/soundcloud.com/dubology-2/dubology-good-morning-dub?referer=');">Good Morning Dub</a>. One issue though is that Windows will go back to sleep in 2 minutes. You can <a href="http://www.vistax64.com/tutorials/171042-sleep-return-timeout-unattended-wake-up.html" onclick="pageTracker._trackPageview('/outgoing/www.vistax64.com/tutorials/171042-sleep-return-timeout-unattended-wake-up.html?referer=');">modify that using a registry key</a> so that it will have enough time to play the music.</p>
<p>Now while the alarm clock website is accomplishing the task of waking me up at the right time, it doesn&#8217;t do a very good job of keeping me awake. Maybe I need to make an interactive component to shut off the alarm <img src='http://tea.cesaroliveira.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://tea.cesaroliveira.net/archives/379/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Uncovering the underlying metadata</title>
		<link>http://tea.cesaroliveira.net/archives/54</link>
		<comments>http://tea.cesaroliveira.net/archives/54#comments</comments>
		<pubDate>Thu, 22 Jan 2009 18:28:43 +0000</pubDate>
		<dc:creator>Cesar</dc:creator>
				<category><![CDATA[hugs]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[seneca]]></category>
		<category><![CDATA[sleep]]></category>

		<guid isPermaLink="false">http://www.cesaroliveira.net/?p=53</guid>
		<description><![CDATA[A few weeks ago, I wanted to do some C++ Mozilla coding to make sure I wasn&#8217;t going soft. But I didn&#8217;t really know what to do. I left it for a bit until I found something weird about the HTML5 spec &#8211; there was a method of testing whether metadata has been loaded, but [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago, I wanted to do some C++ Mozilla coding to make sure I wasn&#8217;t going soft. But I didn&#8217;t really know what to do. I left it for a bit until I found something <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#dom-media-have_metadata" onclick="pageTracker._trackPageview('/outgoing/www.whatwg.org/specs/web-apps/current-work/multipage/video.html_dom-media-have_metadata?referer=');">weird about the HTML5 spec</a> &#8211; there was a method of testing whether metadata has been loaded, but no way to expose the metadata (eg. song title, artist, album, etc) to the user such as through page info.</p>
<p>I think this will be useful. As media starts being embedded into the web browser, it would make sense to start exposing this to the user. I know there have been a few instances where I was listening to something on the radio, but there was little hint of what the song was called (I usually tried to remember a few lyrics and did a Google search. Mixed success).</p>
<p>I brought this up in the whatwg irc channel, and apparently this is being considered for the next version of the spec. Which is understandable, because the server can always display the metadata. But often, media may not be central to the website. For example, background music.</p>
<p>I started look at the Audio/Video backend stuff that moz uses. It got confusing real quick (it doesn&#8217;t help that the <a href="http://mxr.mozilla.org/mozilla-central/source/content/html/content/src/nsHTMLAudioElement.cpp" onclick="pageTracker._trackPageview('/outgoing/mxr.mozilla.org/mozilla-central/source/content/html/content/src/nsHTMLAudioElement.cpp?referer=');">audio code</a> itself is completely empty). Plus I was in a hurry. So I decided to implement it as an extension.</p>
<p>It was a lovely experience. I had a few problems, including finding out that audio/video wasn&#8217;t actually being saved to the cache (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=469446" onclick="pageTracker._trackPageview('/outgoing/bugzilla.mozilla.org/show_bug.cgi?id=469446&amp;referer=');">bug 469446</a>). It was checked-in like 2 days after I found it out. Also, I hate string very much. The string guide helped, but it is still awful. And I made firefox crash a few times because I&#8217;m a nsCOMPtr n00b.</p>
<p>Right now, this extension is working only with ogg vorbis files. Which is stupid because &lt;audio /&gt; is rarely used anywhere, and if it is used, only with certain conditions (wikimedia commons uses the audio tag, but not really. Apparently, the video/audio tags start automatically downloading the media even if it isn&#8217;t under autoplay. This is a mess if you have dozens of audio tags in one page. <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=464272" onclick="pageTracker._trackPageview('/outgoing/bugzilla.mozilla.org/show_bug.cgi?id=464272&amp;referer=');">bug 464272</a>). It is so rarely used, that I had to create a <a href="/files/2009-01-22/audio">audio demo page</a> for testing purposes.</p>
<p>Using it is very simple. Right-clicking on a audio tag brings up the context menu. I decided to use the context menu over Page Info because the media tab of the Page info dialog is very much geared towards images, and that code has to be changed in the firefox source (it&#8217;s not easy/pretty to overlay).</p>
<div style="text-align:center;"><img src="/files/2009-01-22/context.png" alt="audio context menu"/></div>
<p>Which brings up the audio&#8217;s metadata</p>
<div style="text-align:center"><img src="/files/2009-01-22/properties.png" alt="audio properties"/></div>
<p>While a lot of metadata is displayed, some isn&#8217;t. For example, iTunes has support for cover art as a COVERART header. While you can put that in vorbis, it should be noted that it isn&#8217;t <a href="http://wiki.xiph.org/index.php/VorbisComment#Unofficial_.22COVERART.22_field" onclick="pageTracker._trackPageview('/outgoing/wiki.xiph.org/index.php/VorbisComment_Unofficial_.22COVERART.22_field?referer=');">widely supported</a>. So I decided to put in only the <a href="http://www.xiph.org/vorbis/doc/v-comment.html" onclick="pageTracker._trackPageview('/outgoing/www.xiph.org/vorbis/doc/v-comment.html?referer=');">standard headers</a> for now.</p>
<p>This is dealing with C++ code. Which is much more dangerous than javascript code because NS_ERROR_OMGWTF doesn&#8217;t appear in your error console when I try to free an uninitialized pointer. I made basic checks so hopefully nothing bad will happen. But I didn&#8217;t do extensive checking in case we have a bad ogg file or something.</p>
<p>Well, to be fair to me, I always save the function&#8217;s return value. I just didn&#8217;t check whether it passed nor did anything about it. And this won&#8217;t just crash at any time. It&#8217;ll crash if you try to load the metadata (I&#8217;m very nice like that).</p>
<p>The name of the <a href="https://addons.mozilla.org/en-US/firefox/addon/10465" onclick="pageTracker._trackPageview('/outgoing/addons.mozilla.org/en-US/firefox/addon/10465?referer=');">extension is saraswati</a>, named after the <a href="http://en.wikipedia.org/wiki/Saraswati" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Saraswati?referer=');">hindu God of music and knowledge</a> (really, a Google search helped out a lot here). Please enjoy! (Linux x86, x86-64 and Windows x86 only right now)</p>
]]></content:encoded>
			<wfw:commentRss>http://tea.cesaroliveira.net/archives/54/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nuit Blanche</title>
		<link>http://tea.cesaroliveira.net/archives/39</link>
		<comments>http://tea.cesaroliveira.net/archives/39#comments</comments>
		<pubDate>Sun, 05 Oct 2008 23:53:54 +0000</pubDate>
		<dc:creator>Cesar</dc:creator>
				<category><![CDATA[hugs]]></category>
		<category><![CDATA[seneca]]></category>
		<category><![CDATA[sleep]]></category>
		<category><![CDATA[toronto]]></category>

		<guid isPermaLink="false">http://www.cesaroliveira.net/?p=39</guid>
		<description><![CDATA[Toronto was transformed at night on Saturday October 5th for some art thing called nuit blanche. Basically, it&#8217;s an event open all night with gallery&#8217;s across the city open for the public. Tom, Lucy and I spent all Saturday night and Sunday morning making trips to these exhibits, and had breakfast at 6-7am with Mike. [...]]]></description>
			<content:encoded><![CDATA[<p>Toronto was transformed at night on Saturday October 5th for some art thing called <a href="http://www.scotiabanknuitblanche.ca/home.shtml" onclick="pageTracker._trackPageview('/outgoing/www.scotiabanknuitblanche.ca/home.shtml?referer=');">nuit blanche</a>. Basically, it&#8217;s an event open all night with gallery&#8217;s across the city open for the public. Tom, Lucy and I spent all Saturday night and Sunday morning making trips to these exhibits, and had breakfast at 6-7am with Mike.</p>
<p>I was also surprised by meeting Armen there, and his brothers. It makes sense now.</p>
<p>While loads of fun (I didn&#8217;t know what we were doing when we met up. And I didn&#8217;t know how much I would enjoy it when I found out. But it turned out to be a great way to spend a Saturday night), I didn&#8217;t get home until later in the morning, where I crashed in my bed and didn&#8217;t wake up until 16:00 today. I didn&#8217;t manage to get any pictures because I didn&#8217;t bring my camera, but I did get a video of <a href="http://blinkenlights.net/blog" onclick="pageTracker._trackPageview('/outgoing/blinkenlights.net/blog?referer=');">blinkenlights</a> on my cell. They took over City Hall, and it was an entertaining light show. They also had it rigged up to play pong and tetris, but it was not well executed.</p>
<p><video src="http://www.cesaroliveira.net/files/2008-10-05/second.ogg" controls="true">You can view the video directly in the browser if you had a browser that supports the video tag. You&#8217;re stuck with <a href="http://www.cesaroliveira.net/files/2008-10-05/second.ogg" onclick="pageTracker._trackPageview('/outgoing/www.cesaroliveira.net/files/2008-10-05/second.ogg?referer=');">downloading it</a> <img src='http://tea.cesaroliveira.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </video></p>
]]></content:encoded>
			<wfw:commentRss>http://tea.cesaroliveira.net/archives/39/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ohai</title>
		<link>http://tea.cesaroliveira.net/archives/37</link>
		<comments>http://tea.cesaroliveira.net/archives/37#comments</comments>
		<pubDate>Thu, 02 Oct 2008 04:28:55 +0000</pubDate>
		<dc:creator>Cesar</dc:creator>
				<category><![CDATA[hugs]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[fennec]]></category>
		<category><![CDATA[sleep]]></category>

		<guid isPermaLink="false">http://www.cesaroliveira.net/?p=37</guid>
		<description><![CDATA[One internet phenomena that seems to be popular at Mozilla (at least, for some people) is rediculously cute animals and broken english in both in spelling and grammar known as lolspeak. So much so that Paul O&#8217;Shannessy (zpao if the name doesn&#8217;t ring a bell) created the bookmarklet that takes flickr images and turns them [...]]]></description>
			<content:encoded><![CDATA[<p>One internet phenomena that seems to be popular at Mozilla (at least, for some people) is <a href="http://www.cuteoverload.com/" onclick="pageTracker._trackPageview('/outgoing/www.cuteoverload.com/?referer=');">rediculously</a> <a href="http://icanhascheezburger.com/" onclick="pageTracker._trackPageview('/outgoing/icanhascheezburger.com/?referer=');">cute</a> <a href="http://ihasahotdog.com/" onclick="pageTracker._trackPageview('/outgoing/ihasahotdog.com/?referer=');">animals</a> and broken english in both in spelling and grammar known as <a href="http://speaklolspeak.com/?t=anon" onclick="pageTracker._trackPageview('/outgoing/speaklolspeak.com/?t=anon&amp;referer=');">lolspeak</a>. So much so that <a href="http://zpao.com/" onclick="pageTracker._trackPageview('/outgoing/zpao.com/?referer=');">Paul O&#8217;Shannessy</a> (zpao if the name doesn&#8217;t ring a bell) created the bookmarklet that takes flickr images and turns them into canvas drawing overlaying text to it (called <a href="http://playground.zpao.com/lolcanvas/" onclick="pageTracker._trackPageview('/outgoing/playground.zpao.com/lolcanvas/?referer=');">LOLify</a>). The bookmarklet was based off of <a href="http://flolcatr.com/" onclick="pageTracker._trackPageview('/outgoing/flolcatr.com/?referer=');">flolcatr</a>, which brings more lols (well, some of the time anyways. The true lols come of the pics of middle-aged women).</p>
<p>Using that as inspiration, I worked on turning into a Firefox extension. Particularly because I wanted more flexibility out of it. For example, right now the bookmarklet takes random stuff out of the flickr comment and puts them into the image. But I wanted to add in my own stuff to either the top, middle, or bottom of the image and be able to align it left, centre, or right.</p>
<p>After spending all night doing it (I was afraid I would lose interest or get lazy if it took more than one day to complete), I uploaded what I had to <a href="https://addons.mozilla.org/en-US/firefox/" onclick="pageTracker._trackPageview('/outgoing/addons.mozilla.org/en-US/firefox/?referer=');">addons.mozilla.org</a>. After a good nap, I went back and fixed some pretty ugly errors and uploaded a much better version. I ended up with the name of <a href="https://addons.mozilla.org/en-US/firefox/addon/9067" onclick="pageTracker._trackPageview('/outgoing/addons.mozilla.org/en-US/firefox/addon/9067?referer=');">kyoote</a> (cutie), because it&#8217;s one of the words used to describe a <a href="http://speaklolspeak.com/page/LOLzoo" onclick="pageTracker._trackPageview('/outgoing/speaklolspeak.com/page/LOLzoo?referer=');">fennec</a>.  And fennecs are extremely unrepresented as cute animals, even though they are <a href="http://www.flickr.com/photos/floridapfe/2530834190/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/floridapfe/2530834190/?referer=');">adorable</a>. And from today forward, let friday also be known as fen[nec]day.</p>
<p><a href="http://www.flickr.com/photos/the_dro/2389013732/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/the_dro/2389013732/?referer=');"><img src="/files/2008-10-02/lolfennec.png" alt="lolfennec" /></a><br />
<span style="font-size: smaller">Original image taken from <a href="http://www.flickr.com/photos/the_dro" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/the_dro?referer=');">deadstardro</a></span></p>
<p>So sit back this fenday and enjoy a meowtini <img src='http://tea.cesaroliveira.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Update: Clarification based on comment</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://tea.cesaroliveira.net/archives/37/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sleeping</title>
		<link>http://tea.cesaroliveira.net/archives/34</link>
		<comments>http://tea.cesaroliveira.net/archives/34#comments</comments>
		<pubDate>Sun, 14 Sep 2008 21:39:04 +0000</pubDate>
		<dc:creator>Cesar</dc:creator>
				<category><![CDATA[personal]]></category>
		<category><![CDATA[sleep]]></category>

		<guid isPermaLink="false">http://www.cesaroliveira.net/?p=34</guid>
		<description><![CDATA[I have been falling back into unhealthy sleep patterns again. Lately, I&#8217;ve been going to bed at 4 and waking up at around 13-14. I haven&#8217;t quite found the reason why. When in MV on weekends, I liked waking up earlier (ok, maybe 10 early ) because I have the rest of the day to [...]]]></description>
			<content:encoded><![CDATA[<p>I have been falling back into unhealthy sleep patterns again. Lately, I&#8217;ve been going to bed at 4 and waking up at around 13-14. I haven&#8217;t quite found the reason why. When in MV on weekends, I liked waking up earlier (ok, maybe 10 early <img src='http://tea.cesaroliveira.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) because I have the rest of the day to do stuff. And during the weekdays, 8:20 wake-up times are the norm.</p>
<p>My mom thinks it is because I&#8217;m not working, and hence I don&#8217;t have a a reason to wake up earlier. I don&#8217;t think that is the reason. Mainly because I&#8217;ve been struggling with this even when I was in college/high school. I think the real reason is the unfortunate location of my room, and the amount of light that is getting in.</p>
<p>My room has a large window that lets you look out into the street. Which actually kinda sucks for privacy reasons, so I tend to have it closed (blinds + curtains). Unfortunately, the amount of natural light coming in is negligible. So even mid-day, if the lights were off you couldn&#8217;t tell if it was 10 or 14. The nice thing about the apartments is that I was on the 3rd floor, and the blinds were open enough that you could tell it was morning or afternoon. At the very least, the bright sun would wake you up if the alarm clock didn&#8217;t.</p>
<p>Something that actually did help when I was in college was when the lights to my room where on while I was still sleeping. I would usually get up an hour after they were on. (how do I know? My mom would call me and turn on the lights at 8, and I was usually up at 9). I wonder if I should invest in a <a href="http://www.amazon.com/BioBrite-Sunrise-Clock-Advanced-Model/dp/B00196LFGW" onclick="pageTracker._trackPageview('/outgoing/www.amazon.com/BioBrite-Sunrise-Clock-Advanced-Model/dp/B00196LFGW?referer=');">new alarm clock</a> or get a room where the sun can wake me up.</p>
]]></content:encoded>
			<wfw:commentRss>http://tea.cesaroliveira.net/archives/34/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

