<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="http://zeromaid.info/zerofeed" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>ZeroFeed</title>
    <link>http://zeromaid.info/zerofeed</link>
    <description></description>
    <language>en</language>
          <item>
    <title>Personal Open Wi-Fi Access Point on a WRT54G</title>
    <link>http://zeromaid.info/articles/software/personal_open_wifi_access_point_on_a_wrt54g</link>
    <description> &lt;div class=&quot;fields-right&quot;&gt;
       &lt;div class=&quot;fields-attachments&quot;&gt;
    &lt;div class=&quot;field-label&quot;&gt;Attachments:&lt;/div&gt;
    &lt;div class=&quot;field-attachment&quot;&gt;&lt;a href=&quot;/files/owifi_lak.sh&quot;&gt;&lt;img alt=&quot;text/x-sh&quot; src=&quot;http://zeromaid.info/sites/all/modules/filefield/icons/text-x-generic.png&quot; /&gt;LAK Verification Script&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-attachment&quot;&gt;&lt;a href=&quot;/files/owifi_regmac.sh&quot;&gt;&lt;img alt=&quot;text/x-sh&quot; src=&quot;http://zeromaid.info/sites/all/modules/filefield/icons/text-x-generic.png&quot; /&gt;MAC Registration Script&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-attachment&quot;&gt;&lt;a href=&quot;/files/router_fw.sh&quot;&gt;&lt;img alt=&quot;text/x-sh&quot; src=&quot;http://zeromaid.info/sites/all/modules/filefield/icons/text-x-generic.png&quot; /&gt;Firewall Init Script&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-attachment&quot;&gt;&lt;a href=&quot;/files/mailsend.&quot;&gt;&lt;img alt=&quot;application/octet-stream&quot; src=&quot;http://zeromaid.info/sites/all/modules/filefield/icons/application-octet-stream.png&quot; /&gt; WRT54G Tomato Mailsend Binary&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-attachment&quot;&gt;&lt;a href=&quot;/files/mongoose.&quot;&gt;&lt;img alt=&quot;application/octet-stream&quot; src=&quot;http://zeromaid.info/sites/all/modules/filefield/icons/application-octet-stream.png&quot; /&gt;Modified WRT54G Tomato Mongoose Binary&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-attachment&quot;&gt;&lt;a href=&quot;/files/register.shtml&quot;&gt;&lt;img alt=&quot;text/html&quot; src=&quot;http://zeromaid.info/sites/all/modules/filefield/icons/text-html.png&quot; /&gt;Registration Page (Served by Mongoose)&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-attachment&quot;&gt;&lt;a href=&quot;/files/register_do.shtml&quot;&gt;&lt;img alt=&quot;text/html&quot; src=&quot;http://zeromaid.info/sites/all/modules/filefield/icons/text-html.png&quot; /&gt;Registration Action Page (Served by Mongoose)&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-attachment&quot;&gt;&lt;a href=&quot;/files/diagram.pdf&quot;&gt;&lt;img alt=&quot;application/pdf&quot; src=&quot;http://zeromaid.info/sites/all/modules/filefield/icons/application-pdf.png&quot; /&gt;Rough Working iptables Table Diagram&lt;/a&gt;&lt;/div&gt;   &lt;/div&gt;
   &lt;/div&gt;

&lt;div class=&quot;fields-description&quot;&gt;
 &lt;div class=&quot;field-item&quot;&gt;&lt;p&gt;The intention of this project is to build an open wireless network using consumer router hardware in order to provide visiting friends or neighbors Internet access without potentially compromising our own local network.&lt;/p&gt;
&lt;p&gt;For this project, we have a second wireless router configured as a &quot;dummy&quot; with DHCP/DNS switched off and with our primary WRT54Gv4 router&#039;s LAN VLAN&#039;d LAN port plugged into one of its LAN ports so that it can provide wireless access. We do this so that we can use the WRT54G&#039;s WLAN interface with out own internal WPA-Enterprise network.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;We would like the entire system to be self-contained to the router (or routers with limited or (preferably) no involvement from a heavier external server.&lt;/li&gt;
&lt;li&gt;We would like the system to prevent all Internet access for guests who have not registered.&lt;/li&gt;
&lt;li&gt;If possible (and it is a &lt;em&gt;big&lt;/em&gt; if), we would like to explore methods for preventing all except explicitly allowed guests Internet access.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Our project is designed to run on a modified version of the Tomato router OS known as Slodki, though it may work on normal Tomato, as well. The limiting factor might be storage space, though our scripts do not take up much room and may be able to fit on a &lt;a href=&quot;http://tomatousb.org/doc:jffs&quot;&gt;JFFS partition&lt;/a&gt;. In our case, we used a Secure Digital card fitted in a &lt;a href=&quot;http://uanr.com/sdfloppy/&quot;&gt;makeshift 5.25&quot; floppy connector slot&lt;/a&gt; which was then soldered to the GPIO pins of our WRT54Gv4 router.&lt;/p&gt;
&lt;p&gt;Please note that this is one of &lt;a href=&quot;http://www.andybev.com/index.php/Using_iptables_and_PHP_to_create_a_captive_portal&quot;&gt;alternative implementations of a captive portal&lt;/a&gt; available. We chose this implementation out of a desire to adhere to the goals stated above, as well as a desire for overall simplicity. This may not be the optimal implementation, and we believe there will be room for improvement as our understanding of iptables grows, but as it is now the project seems to work on a basic level.&lt;/p&gt;
&lt;p&gt;While explicit sections of code are called out below, please do not overlook the scripts attached for implementation details as well as things that are difficult to explain or easy to overlook otherwise.&lt;/p&gt;
&lt;p&gt;For the purposes of this project, we have the following private networks:&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;192.168.24.0&lt;/td&gt;
&lt;td&gt;Open Wireless Network&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;192.168.250.0&lt;/td&gt;
&lt;td&gt;Internal Private Network&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Limiting Traffic for Unauthorized Clients&lt;/h2&gt;
&lt;p&gt;Before a client is registered on the network, that client should ideally only be able to access the captive portal. Through some experimentation, we have devised the following iptables ruleset to this end:&lt;/p&gt;
&lt;pre&gt;
# Pass along only the bare minimum to get the user to the captive portal.
iptables -t nat -N openwifi
iptables -t nat -A PREROUTING -i vlan2 -j openwifi
iptables -t nat -A openwifi -p udp --dport 67 -j ACCEPT # DHCP
iptables -t nat -A openwifi -d 192.168.24.1 -p udp --dport 53 -j ACCEPT # DNS
iptables -t nat -A openwifi -d 192.168.24.1 -p tcp --dport 8080 \
   -j ACCEPT # Captive Portal Web Server
iptables -t nat -A openwifi -p tcp --dport 80 -j DNAT \
   --to-destination 192.168.24.1:8080
iptables -t nat -A openwifi -j DROP # Drop the rest.
&lt;/pre&gt;&lt;p&gt;
Our approach begins by blocking all traffic that isn&#039;t required to establish a connection to the captive portal. Through experimentation, we have determined the bare minimum to be:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;DHCP, so the guest can get an IP address to talk to the captive portal.&lt;/li&gt;
&lt;li&gt;DNS, so the guest can convert domain names into IP addresses. Note that no matter what IP address the guest asks for, it will get the captive portal. So this is sort of a ruse at this stage.&lt;/li&gt;
&lt;li&gt;The captive portal&#039;s web server, itself.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After this traffic is explicitly allowed, we then redirect all normal web traffic to the captive web portal hosted on the router on port 8080. All other traffic is dropped, so the portal cannot be easily bypassed using protocols like SSH. In hindsight, it should be obvious, but it is very important that DNS queries are allowed through. Otherwise, clients will fail at the resolution stage and never even attempt to fetch any pages, thus preventing the portal from slipping itself into the stream.&lt;/p&gt;
&lt;p&gt;In the future, we would like to implement rate limiting for DNS queries using &lt;a href=&quot;http://www.debian-administration.org/articles/187&quot;&gt;the iptables limit function&lt;/a&gt; in order to prevent guests from bypassing the captive portal using &lt;a href=&quot;http://dnstunnel.de/&quot;&gt;a DNS tunnel&lt;/a&gt;. It will likely take some experimentation to determine a reasonable limit, however. In addition, before we implement this, we would like to explore how effective such a tunnel would be to begin with.&lt;/p&gt;
&lt;h2&gt;The Captive Portal Web Server&lt;/h2&gt;
&lt;p&gt;One of our goals for this project was to run the entire system on the routers involved without having to rely on a heavier server to supply any services. This neccessitated running a complete web server capable of executing scripts to enable iptables rules and keep logs of guests.&lt;/p&gt;
&lt;p&gt;Unfortunately, most consumer-level routers are fairly limited pieces of hardware. This limits our options for serving the authorization system from the router itself since packages like Apache or even nginx or lighthttpd are a bit too heavyweight. One option is to &lt;a href=&quot;http://nezzen.net/2007/10/15/running-a-web-server-on-a-home-router/&quot;&gt;recompile the built-in Tomato web server&lt;/a&gt; to serve normal pages, but this approach does not seem to offer the required scripting ability and building the dependencies for the server seems cumbersome.&lt;/p&gt;
&lt;p&gt;In the end, we settled on &lt;a href=&quot;http://code.google.com/p/mongoose/&quot;&gt;the Mongoose embedded web server&lt;/a&gt;. Mongoose comes in two (relatively) simple to compile C source files and provides a surprising amount of capability for its size and complexity (or lack thereof).&lt;/p&gt;
&lt;p&gt;Compiling Mongoose was as simple as fetching the sources to &lt;a href=&quot;http://repo.or.cz/w/tomato.git?a=tree;hb=tomato-slodki-ND-1.28.02&quot;&gt;Tomato Slodki&lt;/a&gt; that we used for this project using git, installing the included cross-toolchain (we used /usr/local/lib instead of /opt like the README recommended due to constraints on our compiler machine), placing the mongoose source in a new mongoose directory under the /release/src/router subdirectory, and running make with a custom Makefile and some tweaks to the source code itself.&lt;/p&gt;
&lt;p&gt;We found that Mongoose&#039;s CGI capability did not seem to work on our router. It seems the particular uclibc C library our router was using was lacking or otherwise unable to use the &lt;a href=&quot;http://qnxcs.unomaha.edu/help/product/neutrino/lib_ref/e/execle.html&quot;&gt;execle()&lt;/a&gt; function as called in the Mongoose source code. This meant that all CGI requests would fork and then die with a 500 error. Rather than trying to recompile the C library or refactor Mongoose not to use execle(), we opted to take a simpler approach and examine the included SSI implementation more closely.&lt;/p&gt;
&lt;p&gt;While it is limited, the Mongoose SSI subsystem does include an #exec capability which is quite function on the build of Tomato we were working on. We found that we could use it to execute shell scripts to take care of the heavy lifting of registering and managing guests. We did tweak the source code slightly in order to pass the IP address of the guest requesting a page along with the query string to any scripts executed from a given page like so:&lt;/p&gt;
&lt;pre&gt;
static void do_ssi_exec(struct mg_connection *conn, char *tag) {
  char cmd[BUFSIZ];
  FILE *fp;

  /* Setup some useful environment variables. */
  setenv( &quot;REMOTE_IP&quot;, inet_ntoa( conn-&gt;client.rsa.u.sin.sin_addr ), 1 );
  setenv( &quot;QUERY_STRING&quot;, conn-&gt;request_info.query_string, 1 );

  if (sscanf(tag, &quot; \&quot;%[^\&quot;]\&quot;&quot;, cmd) != 1) {
    cry(conn, &quot;Bad SSI #exec: [%s]&quot;, tag);
  } else if ((fp = popen(cmd, &quot;r&quot;)) == NULL) {
    cry(conn, &quot;Cannot SSI #exec: [%s]: %s&quot;, cmd, strerror(ERRNO));
  } else {
    send_file_data(conn, fp, INT64_MAX);
    (void) pclose(fp);
  }
}
&lt;/pre&gt;&lt;p&gt;
This is the modified version of the SSI exec function, though we only added a few lines toward the beginning (the setenv statements). This minor modification increased the utility of this web server for us immensely.&lt;/p&gt;
&lt;p&gt;Finally, the web server is started by the firewall script after deleting and recreating the registration file:&lt;/p&gt;
&lt;pre&gt;
# Start open wi-fi maintenance web server.
export OWIFI_USERS_FILE=/tmp/owifi_users
rm $OWIFI_USERS_FILE
touch $OWIFI_USERS_FILE
killall mongoose
sleep 1
/mmc/bin/mongoose -e /mmc/www/log/error.log -a /mmc/www/log/access.log \
   -r /mmc/www/htdoc -i index.shtml &amp;
&lt;/pre&gt;&lt;p&gt;
In the future, we would consider attaching a registration time (probably in UNIX epoch format) to each record and running a cron job to delete them after a reasonable interval.&lt;/p&gt;
&lt;h2&gt;The Captive Portal Scripts&lt;/h2&gt;
&lt;p&gt;The major script the portal makes use of is the MAC registration script. This script also makes use of the query string environment variables provided by our modified version of Mongoose in order to gather additional information and attach it to the guest registration records. The script also gets the MAC address by grepping the output of an arp lookup on the requester&#039;s IP address provided by Mongoose. When a new registration is recorded, the script calls the lightweight mailer &lt;a href=&quot;http://www.muquit.com/muquit/software/mailsend/mailsend.html&quot;&gt;mailsend&lt;/a&gt; which we compiled in a fashion similar to that of Mongoose as outlined above and sends a message to our e-mail address- as well as logging it to our remote syslog server.&lt;/p&gt;
&lt;p&gt;Since the scripts are called by Mongoose as SSI exec statements, they are written to return output in HTML format to be embedded in the calling pages. This allows the registration script, for example, to report when there was a problem registering the new guest.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;While this is only a rough outline of the project, it seems the most fundamental problems have been solved. Everything else is a matter of convenience or specific implementation. It is possible that this article may be amended with future developments, or that future articles may expand upon this project.&lt;/p&gt;
&lt;p&gt;In the mean time, we hope this may prove useful to others attempting a similar project. If you have any comments or questions, please &lt;a href=&quot;/contact&quot;&gt;contact us&lt;/a&gt; or leave a comment below.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
     <comments>http://zeromaid.info/articles/software/personal_open_wifi_access_point_on_a_wrt54g#comments</comments>
 <category domain="http://zeromaid.info/articles/software">Software</category>
 <pubDate>Fri, 26 Aug 2011 16:33:11 +0000</pubDate>
 <dc:creator>admin_zm</dc:creator>
 <guid isPermaLink="false">34 at http://zeromaid.info</guid>
  </item>
  <item>
    <title>Inner Space</title>
    <link>http://zeromaid.info/zeroblog/2010/01/30/inner_space</link>
    <description>&lt;div class=&quot;field-blog-date&quot;&gt;
Saturday, January 30, 2010&lt;/div&gt;
&lt;div class=&quot;field-blog-username&quot;&gt;
 admin_zm&lt;/div&gt;
&lt;div class=&quot;field-blog-body&quot;&gt;
 &lt;p&gt;Writing a good story is so incredibly difficult. Using magic to create a new world isn&#039;t hard at all, but solidifying the chain of events in that world and conjuring the whole thing in a lot of detail is incredibly taxing. Not only that, but so much detail is lost on the reader, depending on who they are.&lt;/p&gt;
&lt;p&gt;As you can probably see if you&#039;ve been through the &lt;a href=&quot;/anecdotes&quot;&gt;Anecdotes&lt;/a&gt; section, the stories that I tend to actually release are very short and flat. I think stories like that have a special charm in that they leave so much to the imagination of the reader. The detail is sparse and the world created by reading such a story varies highly from one reader to the next. I&#039;m a firm believer that a person&#039;s inner world is much richer and more fascinating than any other person could ever possibly hope to realize.&lt;/p&gt;
&lt;p&gt;Another problem with writing in detail is my interest in what the characters are thinking. When I&#039;m writing a more involved story, I tend to get bored listening to one character&#039;s perspective and line of reasoning the whole time. I like to switch from character to character, but I really like a character who seems like an &quot;enemy to the world&quot; because their actions are shocking and their point of view is hidden from the reader 99% of the time. The problem is that writing that point of view for that short time that it&#039;s not hidden is so much fun that it makes the other characters seem so much more boring in comparison.&lt;/p&gt;
&lt;p&gt;Of course, this is naturally my excuse for publishing so little. I&#039;m firm believer in the idea that I don&#039;t really owe the world my thoughts or anything. I enjoy them so much more when they&#039;re still inside, which is why only four of the Zero Maids exist outside of my world.&lt;/p&gt;
&lt;p&gt;However, at this point, I know a lot more interesting characters who have solidified to the point where I might be able to successfully express them in detail. The problem there is time, energy, and motivation. Those things vary so much these days. Perhaps I will still do such a thing later on.&lt;/p&gt;
&lt;p&gt;Anyway, I changed a bunch of things around on the site. I got rid of the subscription and new user systems. If for some reason you want to keep track of when I update, you can subscribe to the RSS feed for the part of the site you&#039;re interested in using your browser.&lt;/p&gt;
&lt;/div&gt;</description>
     <comments>http://zeromaid.info/zeroblog/2010/01/30/inner_space#comments</comments>
 <category domain="http://zeromaid.info/zeroblog">ZeroBlog</category>
 <pubDate>Sat, 30 Jan 2010 22:40:06 +0000</pubDate>
 <dc:creator>admin_zm</dc:creator>
 <guid isPermaLink="false">32 at http://zeromaid.info</guid>
  </item>
  <item>
    <title>Still Life Programming</title>
    <link>http://zeromaid.info/zeroblog/2009/11/01/still_life_programming</link>
    <description>&lt;div class=&quot;field-blog-date&quot;&gt;
Sunday, November 1, 2009&lt;/div&gt;
&lt;div class=&quot;field-blog-username&quot;&gt;
 admin_zm&lt;/div&gt;
&lt;div class=&quot;field-blog-body&quot;&gt;
 &lt;p&gt;Sometimes I feel like the guy who won&#039;t shut up about not having a television because people are always talking about shows I&#039;ve never heard of. Except I do have a television; I just don&#039;t have cable or satellite. I have a pretty sweet room theater which I use mostly to watch my (maid) anime.&lt;/p&gt;
&lt;p&gt;However, sometimes I like to just take a break and watch something I don&#039;t have to think too deeply about (or at least something I don&#039;t have to take notes on). For that, I usually go to PBS (though sometimes I&#039;ll catch old reruns of the A-Team or Ironside on the retro TV network). PBS is a wonderful network. The local affiliate broadcasts in HD and it&#039;s usually something new and interesting.&lt;/p&gt;
&lt;p&gt;Today was one such break day. I took a half hour earlier and found myself watching a show about painting flowers with an older lady named Helen Van Wyk. The format was similar to that of the old Bob Ross series. Naturally I decided to stay and watch, since I&#039;m an artsy type.&lt;/p&gt;
&lt;p&gt;It was exceptionally charming, though. The visual quality was atrocious on my 24&quot; HDTV and the lady spoke awkwardly and directly to the camera. She made mistakes and corrected them as she did so. It was so incredibly genuine that I couldn&#039;t help but feel like I was watching it live- almost as if she was in the same room, even, and was talking directly to me. Something like that, you know?&lt;/p&gt;
&lt;p&gt;It wasn&#039;t until the ending credits that I found out she&#039;d been dead since 1994.&lt;/p&gt;
&lt;p&gt;For some reason, I find that fascinating. I&#039;m pretty curious about people, and I like to watch them work especially. I like to see them do their job, I like to see what kind of mistakes they make, and I like to see how they deal with those mistakes. I think that might be the most important part of any job- people are not perfect, after all. I also found the little bits of general advice she gave interesting, as many of them applied to my particular field of art as well. &quot;Focus on the start; don&#039;t always just have the finish in mind.&quot; I&#039;ve been bitten by poor architecture enough times to tell you that that&#039;s no raw piece of trout. ~_~&lt;/p&gt;
&lt;p&gt;Anyway, that was today&#039;s adventure. Stay tuned for next time when I go to the kitchen to pour myself a glass of soda.&lt;/p&gt;
&lt;/div&gt;</description>
     <comments>http://zeromaid.info/zeroblog/2009/11/01/still_life_programming#comments</comments>
 <category domain="http://zeromaid.info/zeroblog">ZeroBlog</category>
 <pubDate>Sun, 01 Nov 2009 00:00:00 +0000</pubDate>
 <dc:creator>admin_zm</dc:creator>
 <guid isPermaLink="false">31 at http://zeromaid.info</guid>
  </item>
  <item>
    <title>Old Host, New Host</title>
    <link>http://zeromaid.info/zeroblog/2009/01/14/old_host_new_host</link>
    <description>&lt;div class=&quot;field-blog-date&quot;&gt;
Wednesday, January 14, 2009&lt;/div&gt;
&lt;div class=&quot;field-blog-username&quot;&gt;
 admin_zm&lt;/div&gt;
&lt;div class=&quot;field-blog-body&quot;&gt;
 &lt;p&gt;Welcome to the new ZeroMaid! The site was down for a few days since our old host is no more. In the mean time, we&#039;ve decided to host with NearlyFreeSpeech.net since they&#039;re cheap and people keep saying good things about them.&lt;/p&gt;
&lt;p&gt;The site layout&#039;s also been tweaked a bit. One major change is that Rainmeter skins are now considered &quot;software&quot;. The Rainmeter skins seem to be one of this site&#039;s biggest draws, and links to them have shown up in a lot of forums and imageboards, so we&#039;ve tried to make sure the old links to where they used to be still work for the time being. Bear in mind that this is a legacy accommodation, and new entries must be linked to using the new URL scheme.&lt;/p&gt;
&lt;p&gt;Also, there are still some quirks with IE because IE is broken and we&#039;re a little lazy. We&#039;ll probably fix it eventually. Maybe.&lt;/p&gt;
&lt;p&gt;Anyway, that&#039;s all for now. Enjoy!&lt;/p&gt;
&lt;/div&gt;</description>
     <category domain="http://zeromaid.info/zeroblog">ZeroBlog</category>
 <pubDate>Wed, 14 Jan 2009 00:00:00 +0000</pubDate>
 <dc:creator>admin_zm</dc:creator>
 <guid isPermaLink="false">30 at http://zeromaid.info</guid>
  </item>
  <item>
    <title>Moe System Status</title>
    <link>http://zeromaid.info/software/gadgets/moe_system_status</link>
    <description>&lt;div class=&quot;fields-right&quot;&gt;
 &lt;div class=&quot;fields-screenshots&quot;&gt;
  &lt;img src=&quot;/files/skinshots/moestatus.jpg&quot; alt=&quot;Moe System Status&quot; title=&quot;&quot; width=&quot;320&quot; height=&quot;186&quot; /&gt; &lt;/div&gt;
 &lt;div class=&quot;fields-releases&quot;&gt;
  &lt;div class=&quot;field-label&quot;&gt;Releases:&lt;/div&gt;
  &lt;div class=&quot;filefield-file&quot;&gt;&lt;img class=&quot;filefield-icon field-icon-application-octet-stream&quot;  alt=&quot;application/octet-stream icon&quot; src=&quot;http://zeromaid.info/sites/all/modules/filefield/icons/application-octet-stream.png&quot; /&gt;&lt;a href=&quot;http://zeromaid.info/files/MoeSystemStatus-0.8.10.gg&quot; type=&quot;application/octet-stream; length=1895231&quot; title=&quot;MoeSystemStatus-0.8.10.gg&quot;&gt;Package-0.8.10&lt;/a&gt;&lt;/div&gt; &lt;/div&gt;
&lt;/div&gt;

&lt;div class=&quot;fields-details&quot;&gt;
 &lt;div class=&quot;field-label&quot;&gt;Platform:&lt;/div&gt;
 &lt;div class=&quot;field-item&quot;&gt;Google Gadgets&lt;/div&gt;
 &lt;/div&gt;

&lt;div class=&quot;fields-description&quot;&gt;
 &lt;div class=&quot;field-label&quot;&gt;Description:&lt;/div&gt;
 &lt;div class=&quot;field-item&quot;&gt;&lt;p&gt;You may distribute this gadget freely, as well as modify the contents. It would be appreciated if you were to include a link back to the original author&#039;s website: &lt;a href=&quot;http://zeromaid.info&quot; title=&quot;http://zeromaid.info&quot; rel=&quot;nofollow&quot;&gt;http://zeromaid.info&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This gadget uses images of moe-moe girls from various series. The creator of this gadget did not draw the included images, but rather found them on various anonymous image boards. The creator of this gadget did modify the images in order to fit the frame and blink. &lt;/p&gt;
&lt;p&gt;This gadget provides basic system status next to moe-moe girls with blinking eyes. The gadget tries to obtain system information in the most cross-platform-friendly way possible.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
     <comments>http://zeromaid.info/software/gadgets/moe_system_status#comments</comments>
 <category domain="http://zeromaid.info/software/gadgets">Gadgets</category>
 <pubDate>Wed, 08 Oct 2008 01:07:48 +0000</pubDate>
 <dc:creator>admin_zm</dc:creator>
 <guid isPermaLink="false">1 at http://zeromaid.info</guid>
  </item>
  <item>
    <title>The Doll Who Learned Loneliness</title>
    <link>http://zeromaid.info/anecdotes/short_stories/the_doll_who_learned_loneliness</link>
    <description>
&lt;div class=&quot;fields-description&quot;&gt;
 &lt;div class=&quot;field-item&quot;&gt;&lt;p&gt;There once was a doll who lived alone in a field of flowers. Having lived there for a very long time, the doll was content and never made an attempt to see the outside world. &lt;/p&gt;
&lt;p&gt;The doll simply spent her days chasing the animals that lived in the field, dancing among the flowers that grew in the field, and spending time quietly watching the river that flowed through the field. There was even another doll that lived in the river whom she could see looking up from the water when she climbed up onto a sturdy old log embedded in the near bank. &lt;/p&gt;
&lt;p&gt;The other doll had always been living in the river for as long as the doll could remember. The doll would occasionally come to spend a lazy afternoon talking to the other doll as she watched the clouds float by underneath the river&#039;s current. The other doll didn&#039;t seem to talk much, but she was a great listener. Talking to her was one of the doll&#039;s favorite pastimes.&lt;/p&gt;
&lt;p&gt;And so it was in this way that the doll lived her idyllic life. That is until one day, when a girl came to the field looking for flowers to pick. It was then that she happened upon the doll chasing a rabbit. The girl was surprised, as she had never seen a doll that could move on its own before. The doll was surprised, as she had never seen a human girl before.&lt;/p&gt;
&lt;p&gt;It was the girl who spoke first and asked the doll if she had a name. This puzzled the doll, as she had never really thought about such a thing. She was herself, so she had never needed to call herself. She said she didn&#039;t have one, and so the girl named the doll Lucy. &lt;/p&gt;
&lt;p&gt;Lucy noticed the girl&#039;s flower basket, and asked if the girl was picking flowers. The girl self-consciously acknowledged her intent, worried that Lucy might object. It seemed this was Lucy&#039;s field, after all. However, Lucy was very unselfish. She even offered to show the girl where the flowers grew the biggest and brightest! It was the least she could do as payment for her fancy new name, after all.&lt;/p&gt;
&lt;p&gt;And so Lucy and the girl spent the rest of the day playing. When the sun began to set and they had to part ways, the girl said she&#039;d be back.&lt;/p&gt;
&lt;p&gt;Indeed, the girl did come back the next day and played some more. And the day after that, too. The two became friends for a while, until one day the girl stopped coming to the field. The days went by, and when the girl hadn&#039;t returned for a very long time, Lucy realized that she would probably never return. Even so, Lucy&#039;s cheerful manner recovered fairly quickly. After all, she had learned about humans, and she had even gotten a name!&lt;/p&gt;
&lt;p&gt;Knowing nothing else, Lucy returned to her solitary lifestyle. She didn&#039;t mind, except it seemed like something was missing now. She couldn&#039;t quite put her finger on what was wrong. It was a subtle kind of loss. She found herself spending more time by the riverside with the other doll (who still had no name) while trying to figure it out. Eventually, Lucy gave up, and instead decided to explore new pastimes with which to distract herself.&lt;/p&gt;
&lt;p&gt;It was while Lucy was trying to catch frogs near the river one day that she met a new human girl. This time the doll was able to introduce herself properly. The two became friends quickly, and the new girl became a frequent visitor to the field. &lt;/p&gt;
&lt;p&gt;Lucy was still very much interested in humans. She and the girl were talking one day when the girl mentioned her mother. This interested Lucy, as she&#039;d never had a mother. Curious, she asked the girl to take her home to meet the girl&#039;s family. The girl thought it didn&#039;t sound like a bad idea. And so, chatting cheerfully, they headed for the nearby human village together. Lucy and the girl didn&#039;t get very far past the point where the tall grasses of the field ended when the doll suddenly fell asleep mid-sentence.&lt;/p&gt;
&lt;p&gt;This terrified the girl. The once-lively Lucy was now just a normal doll with hollow eyes and stiff limbs. Frightened, the girl picked Lucy up and returned her to the middle of field, resting her carefully against a tree stump. Without waiting, the girl ran from the field, never to return.&lt;/p&gt;
&lt;p&gt;Lucy awoke the next day as if nothing bad had happened. She remembered the day before and she remembered trying to leave the field with the girl, but she remembered nothing after that. On top of that, the girl was nowhere to be seen. Lucy waited, but the girl didn&#039;t return that day, or the next day, or the day after.&lt;/p&gt;
&lt;p&gt;This was troubling to Lucy, though again she couldn&#039;t put her finger on why. All she could do was return to what she did before, and that&#039;s what she did. &lt;/p&gt;
&lt;p&gt;This pattern of new and strange human girls coming to the field for a while and then mysteriously vanishing happened several more times before Lucy began to find herself dreading humans for some reason. Even when she thought about it, she couldn&#039;t figure out why it bothered her when they stopped coming, or what this feeling of emptiness was, or why it got worse each time. Unwittingly, she had learned loneliness. It wasn&#039;t the only lesson she&#039;d learned from humans, of course, but it was certainly the strongest.&lt;/p&gt;
&lt;p&gt;And so Lucy became a much shyer doll. She didn&#039;t know if it was her fault that humans would stop coming, or if it simply a result of the type of humans who came to the field. All she could reason was that she would probably be better off if she avoided humans from that point forward. With that in mind, she began to sleep during the day, hiding inside of a hollowed-out tree stump and only coming out during the night to play.&lt;/p&gt;
&lt;p&gt;One night, Lucy came out of her stump to find a wolf sitting in the middle of the field, watching the stars. Never having seen a wolf before (and not knowing that it was called a wolf), Lucy was curious. Even so, her experience with humans had given her a stronger fear of the unknown. While Lucy was struggling with this new emotion, the wolf took notice of her and started to move in her direction to investigate. Panicking, Lucy immediately fled back into her tree stump.&lt;/p&gt;
&lt;p&gt;Lucy didn&#039;t sleep at all for the next three days and nights. She simply stayed in her stump, wondering what was wrong with her. She had developed so many strange feelings because of humans. She was afraid. Afraid of sitting still and being lonely, but also afraid of going out and making new friends who would probably eventually leave her alone again.&lt;/p&gt;
&lt;p&gt;Lucy thought hard for those three days and nights, and on the morning of the fourth day she remembered the fun she used to have with the other doll that lived in the river. Knowing the other doll was very reliable, Lucy decided that she would ask her if she knew what to do.&lt;/p&gt;
&lt;p&gt;And so Lucy came to the old log hanging over the river and looked over the edge. The other doll was there as always, returning her gaze, but now she looked a lot worse-off than she had in the past. She was a lot more ragged, and she seemed more sad. Armed with her new knowledge of feelings, Lucy decided that the other doll looked lonely too.&lt;/p&gt;
&lt;p&gt;That was when an idea struck Lucy. The other doll had been in this field for at least as long as Lucy had. Why couldn&#039;t the two be friends? With a renewed enthusiasm, Lucy made her proposal to the other doll.&lt;/p&gt;
&lt;p&gt;When Lucy finished her story, she imagined the other doll seemed to look more hopeful than she had a few moments ago. Looking for an agreement, Lucy nodded at the doll, who nodded in reply. Overjoyed, Lucy left her loneliness behind as she let go of the log and plunged forward into her new life with her reliable old friend.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
     <comments>http://zeromaid.info/anecdotes/short_stories/the_doll_who_learned_loneliness#comments</comments>
 <category domain="http://zeromaid.info/anecdotes/short_stories">Short Stories</category>
 <pubDate>Sat, 06 Sep 2008 04:36:00 +0000</pubDate>
 <dc:creator>admin_zm</dc:creator>
 <guid isPermaLink="false">4 at http://zeromaid.info</guid>
  </item>
  <item>
    <title>Converting a gd Image to a Windows Bitmap</title>
    <link>http://zeromaid.info/articles/software/converting_a_gd_image_to_a_windows_bitmap</link>
    <description>
&lt;div class=&quot;fields-description&quot;&gt;
 &lt;div class=&quot;field-item&quot;&gt;&lt;p&gt;I&#039;ll note this here because I couldn&#039;t find any useful information on converting an image stored in &lt;a href=&quot;http://www.libgd.org/Main_Page&quot;&gt;libgd&lt;/a&gt;&#039;s native image format to Windows&#039;s native bitmap format directly anywhere on Google. In the end, I had to piece together a few clues.&lt;/p&gt;
&lt;p&gt;I cobbled together the following algorithm from hints gathered at the PHP manual site (for hints as to how a gd image was structured and how that structure could be accessed) as well as &lt;a href=&quot;http://www.codeproject.com/KB/graphics/drawing2bitmap.aspx&quot;&gt;a demo project that wrote bitmaps&lt;/a&gt; and &lt;a href=&quot;http://www.martinreddy.net/gfx/2d/BMP.txt&quot;&gt;the Windows bitmap file format specification&lt;/a&gt;. I also ended up counting on my fingers in binary a lot.&lt;/p&gt;
&lt;p&gt;The code, as seen almost directly in UIGuy Mercurial revision 11:3ef2aa60a41f, is as follows:&lt;/p&gt;
&lt;pre&gt;
// UIGuy uses wxWidgets and thus wxStrings, 
// so replace this with your string library of choice.
FILE* p_filOutput = fopen( (char*)strPathIn.char_str(), &quot;wb&quot; );

if( NULL == p_filOutput ) {
   // TODO: Error?
   return;
}

// Windows Bitmap Info Header
BITMAPINFOHEADER bmih;
bmih.biSize = sizeof( BITMAPINFOHEADER );
bmih.biBitCount = 24;
bmih.biPlanes = 1;
bmih.biCompression = BI_RGB;
bmih.biWidth = gdImageSX( p_imgBufferIn );
bmih.biHeight = gdImageSY( p_imgBufferIn );
bmih.biSizeImage = bmih.biHeight * bmih.biWidth * 3;
bmih.biXPelsPerMeter = 0; // As it turns out, it&#039;s VERY IMPORTANT to
bmih.biYPelsPerMeter = 0; // zero these out, even though we&#039;re not
bmih.biClrUsed = 0;       // using them. Otherwise, the bitmap is not
bmih.biClrImportant = 0;  // valid.

// Windows Bitmap File Header
BITMAPFILEHEADER bmfh;
int intBitsOffset = sizeof( BITMAPFILEHEADER ) + bmih.biSize;
LONG lngImageSize = bmih.biSizeImage;
LONG lngFileSize = intBitsOffset + lngImageSize;
bmfh.bfType = &#039;B&#039; + ( &#039;M&#039; &amp;lt;&amp;lt; 8 );
bmfh.bfOffBits = intBitsOffset;
bmfh.bfSize = lngFileSize;
bmfh.bfReserved1 = bmfh.bfReserved2 = 0;

fwrite( &amp;amp;bmfh, 1, sizeof( BITMAPFILEHEADER ), p_filOutput );
fwrite( &amp;amp;bmih, 1, sizeof( BITMAPINFOHEADER ), p_filOutput );

int intXCount, intYCount, intCount;
for( intYCount = bmih.biHeight - 1 ; intYCount &gt;= 0 ; --intYCount ) {
   for( intXCount = 0 ; intXCount &amp;lt; bmih.biWidth ; ++intXCount  ) {
      unsigned int intColor = 
         gdImageGetPixel( p_imgBufferIn, intXCount, intYCount );
      // 3 * 8 is 24. We only write the first 24 bits of each pixel.
      // This is fine because this is a 24-bit image. No pixel will be
      // bigger than 24 bits, right?
      fwrite( &amp;amp;intColor, 1, 3, p_filOutput );
   }
}

fclose( p_filOutput );
&lt;/pre&gt;&lt;p&gt;
This code should be pretty self-explanatory. Looking it over, I&#039;m a little ashamed of how much trial and error this took me, but I&#039;m pretty impatient and not very skilled, so it can&#039;t be helped for now. As you can probably guess, it was much easier once I found the bitmap documentation. At least the next person shouldn&#039;t have any trouble at all (as long as they see this, at least).&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
     <comments>http://zeromaid.info/articles/software/converting_a_gd_image_to_a_windows_bitmap#comments</comments>
 <category domain="http://zeromaid.info/articles/software">Software</category>
 <pubDate>Thu, 14 Aug 2008 19:20:08 +0000</pubDate>
 <dc:creator>admin_zm</dc:creator>
 <guid isPermaLink="false">5 at http://zeromaid.info</guid>
  </item>
  <item>
    <title>The Lonely Princess</title>
    <link>http://zeromaid.info/anecdotes/short_stories/the_lonely_princess</link>
    <description>
&lt;div class=&quot;fields-description&quot;&gt;
 &lt;div class=&quot;field-item&quot;&gt;&lt;p&gt;Once upon a time there lived a beautiful princess who would spend her days by herself in her castle practicing her arcane magic of dreams. Because she never left the castle walls, she was known to the people of the kingdom and its neighboring realms as the lonely princess.&lt;/p&gt;
&lt;p&gt;The lonely princess was perfectly content with her lifestyle, however, and she enjoyed her magical practice. The regent, however, only saw the princess as a girl with no friends and, more distressingly, no suitors. Indeed, despite her beauty and skill, the princess was probably not suitable to be a princess at all!&lt;/p&gt;
&lt;p&gt;And so the regent, after thinking the problem through, came up with a plan. He would rectify the problem of the lonely princess and restore honor to the throne to which he was retained. He would spare no hassle in his search for a suitor who would pique the interest of the princess.&lt;/p&gt;
&lt;p&gt;The regent sent a invitations for three eligible princes from neighboring countries to come and meet with the princess. Even if she never left her castle, the princess still had a reputation for her beauty, and so all three princes traveled to the domain of the lonely princess.&lt;/p&gt;
&lt;p&gt;The first prince was from a country that was very rich and resourceful. He was fabulously wealthy, although uncharacteristically humble for a man of his affluence. He lived in luxury, but he was always sure that the wealth of his kingdom reached down to even the most wretched of beggars living in its streets.&lt;/p&gt;
&lt;p&gt;Upon meeting with the princess, he told her of his country&#039;s prosperity and professed that were she to wed him, she would spend the rest of her days in a luxury that far surpassed anything any of the other princes could offer. Together, the prince and the princess would see to it that all of the people of both kingdoms would enjoy a golden age unlike any the princess&#039;s kingdom had known up until the present.&lt;/p&gt;
&lt;p&gt;The princess received the prince&#039;s conversation, offering mild acknowledgments when they were appropriate, all the while wearing a polite, if slightly bored, smile. When the prince proposed to her, she smiled wistfully and informed him that were he as interesting as he was munificent, she might consider his offer, but that was not the case and so she must refuse.&lt;/p&gt;
&lt;p&gt;The second prince was from a country known for its steelwork. He boasted about the skill of his court&#039;s smiths and declared his own personal passion for the skill of melding steel which was so valued in his country. In this way, he attempted to appeal to the princess&#039;s apparent desire for a man of great skill.&lt;/p&gt;
&lt;p&gt;The princess seemed receptive during the prince&#039;s conversation, but when the time came and he proposed, she shook her head and informed him that were his passion channeled to an area she could appreciate on more than a superficial level, she might consider his offer, but that was not the case and so she must refuse.&lt;/p&gt;
&lt;p&gt;The final prince was from a country known for its spirituality. This prince was willing to make a leap of faith that the princess had indeed chosen God before any man could claim her. He thus proposed that she worship alongside him for the rest of her life.&lt;/p&gt;
&lt;p&gt;Unfortunately faith is not always rewarded, and in this case it certainly wasn&#039;t. The princess simply turned the third prince down, declaring that her life was given to more than a mere god. She seemed a little irritated at this prince&#039;s assertions about her as she vociferously denied his proposal.&lt;/p&gt;
&lt;p&gt;The regent was mortified at this turn of events. If these three men of character and repute could not woo the princess, what other measures else could he possibly take? He spent the rest of the day pacing in the castle courtyard when he overheard a couple of voices discussing the very topic on which he was milling at the moment. The voices belonged to two men and they seemed to understand the problem well, though that was not surprising as the story of the lonely princess who would never leave her castle was known to all in the kingdom as well as many surrounding kingdoms at the time.&lt;/p&gt;
&lt;p&gt;However, the regent was inspired by this. Perhaps the princess was intimidated by the majesty of the men which he had presented? He decided that this was no time to spare the princess&#039;s pride, and that desperate measures were warranted.&lt;/p&gt;
&lt;p&gt;The regent had the guard invite the two men which had been discussing the princess just outside the castle walls inside. Upon meeting them, he informed them that he would give each of them a chance for the hand of the very beautiful and talented princess that had been daydreaming about. Of course, both men were interested in this, and so they accepted easily.&lt;/p&gt;
&lt;p&gt;The first man was a sailor. The princess listened with fascination to his tales from the high seas. He had seen a lot of adventure in his travels, and his stories were undoubtedly exciting!&lt;/p&gt;
&lt;p&gt;Unfortunately for the sailor, when the time came, the princess denied his proposal easily. Her reason was simply that he seemed to exciting for a boring girl like her, and while it was nice to hear about his world, she preferred to hear such things from a safe distance.&lt;/p&gt;
&lt;p&gt;And so it came time for the final suitor to meet the princess. As it turns out, this suitor was an arcane mage of dreams. He had dedicated his studies and his vocation thus far to the very topic for which the princess expressed so much enthusiasm.&lt;/p&gt;
&lt;p&gt;The regent watched with excitement as the princess actively engaged herself in the conversation for the first time. Her face and hands were animated as she described the spells she had conjured thus far and the techniques which she found most effective. The mage even pointed out several things she might try in order to improve her technique; indeed, his knowledge of the skill seemed to be surprisingly in excess of her own.&lt;/p&gt;
&lt;p&gt;And so it came time for the final suitor to propose. When the words had left his lips, the princess seemed to freeze in place for a moment, as if the mage had suddenly announced that he was, in fact, the sailor wearing a disguise. Realizing that she had indeed heard the mage correctly, she became solemn and inquired as such:&lt;/p&gt;
&lt;p&gt;&quot;Indeed, you are a man who shares my passion, and in fact your skill appears to exceed even my own. Is it true, then that you are willing to devote your life to me, that I devote my own to you?&quot;&lt;/p&gt;
&lt;p&gt;Barely able to contain his excitement, the man enthusiastically agreed to this. Seeing the man&#039;s answer, the princess sighed heavily. With a voice dripping with what seemed to be regret, she then informed the mage:&lt;/p&gt;
&lt;p&gt;&quot;I see... That is sad, then. While your skill and passion exceed my own, your devotion sways so easily. Were the art of arcane dream magic to hear your words, she would weep, and I am only shamed at being the one to provoke such a deplorable act of betrayal.&quot;&lt;/p&gt;
&lt;p&gt;The mage could feel the color draining from his own face as the princess continued after a moment&#039;s pause: &quot;I know that you must have some love in your heart, for your skill could not have grown as such otherwise. Please leave here, and never return. Go to your place of practice and beg forgiveness with every bit of effort and study you can muster. If, in ten years, I learn that my skill has exceeded yours, even with your head start, I would think it nothing other than unfortunate to the last.&quot;&lt;/p&gt;
&lt;p&gt;With that the princess stood and left the room briskly as the regent and the mage watched in stunned silence. The regent then dazedly led the mage back to the front gate, and from there the mage wandered mindlessly back to his apartments where he immediately took the princess&#039;s advice and began practicing.&lt;/p&gt;
&lt;p&gt;And so it was that the lonely princess never married. Of course, she did realize her own shortcomings, and on her eighteenth birthday, she informed the regent that he was free to rule the kingdom as he pleased, for the lonely princess was no princess at all. After delivering this message, she gathered some supplies and ventured off in the direction of a mountain village known to be the final resting place of another legendary dream mage.&lt;/p&gt;
&lt;p&gt;The lonely princess was never heard from again, but the people of the kingdom and the regent himself often wondered how she could stand to be so lonely. It never occurred to them that not only was she never a princess in her own mind, neither was she actually lonely. &lt;/p&gt;
&lt;p&gt;Certainly, she wouldn&#039;t have minded a companion if she had found one like herself, but even in a lonely world which she could only read as misguided, the lonely princess was still accompanied her entire life by the skill which she had taken up when she was little. A skill which couldn&#039;t be taken from her, and would never abandon her. Being more than content with this, the lonely princess was perhaps the least lonely girl the kingdom had ever known.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
     <comments>http://zeromaid.info/anecdotes/short_stories/the_lonely_princess#comments</comments>
 <category domain="http://zeromaid.info/anecdotes/short_stories">Short Stories</category>
 <pubDate>Thu, 07 Aug 2008 20:50:24 +0000</pubDate>
 <dc:creator>admin_zm</dc:creator>
 <guid isPermaLink="false">6 at http://zeromaid.info</guid>
  </item>
  <item>
    <title>The Fox and the Girl</title>
    <link>http://zeromaid.info/anecdotes/short_stories/the_fox_and_the_girl</link>
    <description>
&lt;div class=&quot;fields-description&quot;&gt;
 &lt;div class=&quot;field-item&quot;&gt;&lt;p&gt;At one time, in a forest on one of the larger southern islands, there lived a solitary fox- though this was no ordinary fox. She had had the fortune to live a very long time, and as a result had become very clever.&lt;/p&gt;
&lt;p&gt; The secret to this fox&#039;s longevity, of course, was her willingness to indulge her own appetite for play. Granted, in the relatively care-free life of an island fox, the definition of &quot;play&quot; is pretty wide.&lt;/p&gt;
&lt;p&gt; Every day she awoke and spent a joyful morning catching her breakfast on the rocky eastern shore of the island.&lt;br /&gt;
Following that, she would chase after butterflies in the forest, or maybe sun herself on the rocky northern beach, or engage in one of any number of pleasant passtimes.&lt;/p&gt;
&lt;p&gt; It was in this care-free way that she lived her life, until the day when a boat arrived on the northern beach. Never having seen a boat before, and used to being the cleverest animal on the island, the fox decided to investigate this strange new beached object.&lt;/p&gt;
&lt;p&gt; Even the curious fox was surprised to discover, however, that this strange object seemed to be carrying a single new animal which she&#039;d never seen before. This animal was, of course, a small human girl.&lt;/p&gt;
&lt;p&gt; The girl was fast asleep against the side of the boat, though the fox could tell she was definitely alive by the gentle rise and fall of her chest. Apparently she had been carried to the island by the ocean currents and some measure of luck.&lt;/p&gt;
&lt;p&gt; Seeing this, the fox found herself strangely interested in this new animal. Fearlessly, she lept to the deck of the boat and nudged the girl gently. The girl&#039;s sleep had been light and fitful, and she woke rather easily.&lt;/p&gt;
&lt;p&gt; Of course, the girl had never seen a fox before, by some strange quirk of fate. She wasn&#039;t afraid, though. Rather, she seemed almost as curious about the fox as the fox was about her.&lt;/p&gt;
&lt;p&gt; And so the two became fast friends. The fox taught the girl many things, including fishing and frog-catching. The most important thing the fox taught the girl, however, was the importance of play.&lt;/p&gt;
&lt;p&gt; The fox, of course, couldn&#039;t speak, despite her cleverness. And so it was that she couldn&#039;t know of the girl&#039;s history. The girl didn&#039;t seem to want to talk or think about it, though, and so she was happy to embrace the fox&#039;s care-free lifestyle.&lt;/p&gt;
&lt;p&gt; This idyllic sequence continued for many years, until the girl was a young woman. The fox was very, very, old at this point. She had lived a happy life, but she knew the end was near for her.&lt;/p&gt;
&lt;p&gt; And so the fox decided. She was happy this girl had come to spend this time with her, but she also knew that this girl was much cleverer than she could ever hope to be. It troubled her to think that this girl might end up alone on this tiny island.&lt;/p&gt;
&lt;p&gt; One morning, the fox brought the girl to the landing site of boat in which the girl had been found. The fox had been sick for a couple days, and the girl knew something was wrong from the way the fox had been limping. The fox was determined, however.&lt;/p&gt;
&lt;p&gt; When they reached the boat, the fox gazed purposefully at the now somewhat aged vessel that was sitting on the beach. The fox then used the last of her energy to leap onto a small nearby boulder, and finally closed her eyes.&lt;/p&gt;
&lt;p&gt; The girl, having spent a large portion of her life with the fox, realized the fox&#039;s intention after some consideration. The fox was telling her to go back, taking what she&#039;d learned, and to make what she could of herself.&lt;/p&gt;
&lt;p&gt; Rather than feeling sad, however, the girl began realize the amount of time which had passed. Remeniscing, she realized the fox had given her more than enough to conquer what had been haunting her in the world of humans: play time.&lt;/p&gt;
&lt;p&gt; And so it was that the girl made the minor repairs to the surprisingly sturdy old boat, and began her voyage back to the future which she had previously abandoned.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
     <comments>http://zeromaid.info/anecdotes/short_stories/the_fox_and_the_girl#comments</comments>
 <category domain="http://zeromaid.info/anecdotes/short_stories">Short Stories</category>
 <pubDate>Thu, 07 Aug 2008 02:36:40 +0000</pubDate>
 <dc:creator>admin_zm</dc:creator>
 <guid isPermaLink="false">9 at http://zeromaid.info</guid>
  </item>
  <item>
    <title>Extracting the Background Music from Touhou Scarlet Weather Rhapsody</title>
    <link>http://zeromaid.info/articles/software/extracting_the_background_music_from_touhou_scarlet_weather_rhapsody</link>
    <description> &lt;div class=&quot;fields-right&quot;&gt;
       &lt;div class=&quot;fields-attachments&quot;&gt;
    &lt;div class=&quot;field-label&quot;&gt;Attachments:&lt;/div&gt;
    &lt;div class=&quot;field-attachment&quot;&gt;&lt;a href=&quot;/files/thbgmextractor_0.gif&quot;&gt;&lt;img alt=&quot;image/gif&quot; src=&quot;http://zeromaid.info/sites/all/modules/filefield/icons/image-x-generic.png&quot; /&gt;thbgmextractor English Interface&lt;/a&gt;&lt;/div&gt;   &lt;/div&gt;
   &lt;/div&gt;

&lt;div class=&quot;fields-description&quot;&gt;
 &lt;div class=&quot;field-item&quot;&gt;&lt;p&gt;This is actually pretty simple to do, though I haven&#039;t found any English instructions for doing so as of this writing. I did, however, find a very informative page on &lt;a href=&quot;http://blog.xuite.net/lkwaoi/touhou/13069089&quot;&gt;Touhou music extraction&lt;/a&gt; which included instructions for SWR.&lt;/p&gt;
&lt;p&gt;This tutorial is Windows-centric, since SWR is a Windows game to begin with. Even if you normally use a different operating system, you should have a method of running Windows and .NET applications available to you.&lt;/p&gt;
&lt;p&gt;To begin with, you need:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://variabler-stern.sakura.ne.jp/download/titles_th105.zip&quot;&gt;The list of music titles from Touhou SWR.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://coolier.sytes.net:8080/th_up3/file/th3_0450.zip&quot;&gt;This tool for extracting SWT .dat files.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.rarewares.org/ogg-oggdec.php&quot;&gt;This command-line OGG decoder.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://smdn.invisiblefulmoon.net/distributions/works/tools/ThbgmExtractor/thbgmextractor_1_3_exe.lzh&quot;&gt;The Touhou BGM Extractor.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.free-codecs.com/download/Lame_Encoder.htm&quot;&gt;(Optional) LAME MP3 Encoder&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;An installed copy of Scarlet Weather Rhapsody from which to extract the music!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you have all of these things, then we&#039;re ready to begin extraction!&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Extract &lt;em&gt;oggdec.exe&lt;/em&gt; from the OGG decoder package and &lt;em&gt;th105_bgm_tmp.bat&lt;/em&gt; from the music titles package into a directory somewhere on your hard drive. We&#039;ll call this the &quot;working directory&quot; for now.&lt;/li&gt;
&lt;li&gt;Copy the file &lt;em&gt;th105b.dat&lt;/em&gt; from your SWR game directory (wherever you installed it) to the working directory we created in step 1.&lt;/li&gt;
&lt;li&gt;You should now be able to double-click and run the &lt;em&gt;th105_bgm_tmp.bat&lt;/em&gt; file, which will use the OGG decoder and .dat file extractor to build a new temporary song data file.&lt;/li&gt;
&lt;li&gt;Extract thbgmextractor to a directory of your choosing. This can be the working directory, or somewhere else.&lt;/li&gt;
&lt;li&gt;Finally, extract the &lt;em&gt;titles_th05.txt&lt;/em&gt; file from the music titles package into whichever directory you&#039;ve extracted thbgmextractor to.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now that you have a temporary song data file full of uncompressed music, you can use thbgmextractor to extract the music into standard PCM .wav files with titles. I&#039;ve attached a rough translation of the thbgmextractor interface to this post. My Japanese isn&#039;t great, but it should give you a general idea. The tool is open-source, so I might release a translated version at some point, maybe.&lt;/p&gt;
&lt;p&gt;You can re-compress these to MP3 format using a tool like &lt;a href=&quot;http://lame.sourceforge.net/index.php&quot;&gt;LAME&lt;/a&gt; by selecting the option to do so inside thbgmextractor. If you just want the music and you don&#039;t care about titles or OGG compression, you can actually find the OGG music extracted directly from the game archive inside of the &lt;em&gt;data/bgm&lt;/em&gt; subdirectory of the working directory.&lt;/p&gt;
&lt;p&gt;Whatever you choose to do, you can delete the entire working directory once you&#039;ve gotten the music you want from it.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
     <comments>http://zeromaid.info/articles/software/extracting_the_background_music_from_touhou_scarlet_weather_rhapsody#comments</comments>
 <category domain="http://zeromaid.info/articles/software">Software</category>
 <pubDate>Thu, 29 May 2008 21:08:48 +0000</pubDate>
 <dc:creator>admin_zm</dc:creator>
 <guid isPermaLink="false">11 at http://zeromaid.info</guid>
  </item>
  </channel>
</rss>