Random photo

Thanks to the lack of posting idea today, here are some photo I took (and forgotten) since few months ago.

Sky, taken from my campus at October last year

I sometimes randomly take photo. With crappy (phone) camera.

Thanks to my connection, I can’t upload another images. I’ll upload them at Thursday if I still have interest to do it.

On danbooru

Turns out I didn’t do anything this past week. Hopefully I can finish the installation-in-subdirectory on Saturday.

It should be straightforward but the main problem is I have to make sure I didn’t miss anything. There are a lot of places in main version which still use absolute path for its link generation. Even worse – most of the links are manually generated using literal <a ...> tag instead of Rails’ link_to. The other problem would be the JavaScript – the prototype JS used also contains lots of absolute path for operation with JSON. For such area I’m planning to use relative path combined with base tag in head.

Also documentation is still coming along… somewhere in my head.

danbooru for windows


This morning I randomly decided to try installing danbooru on Windows (7-x64). And indeed it works. Mostly.

Using mongrel and nginx since unicorn is not available on Windows.

Few things to note:

* system_timer is missing since I can’t seem to install it. Probably need to try ruby19 or ruby18-1.8.6-p27 (currently using ruby18-1.8.6-p383)
* manual initial database initialization since the script I made is specifically for *nix systems
* compiling danbooru_image_resizer is… *fun*
* for whatever reason I can’t install mongrel_service
* apparently there’s something missing. Or broken. Or both – there’s message “The system cannot find the path specified.” every time I start mongrel and do migrate

…anyone interested trying this on production server? 😛

_Last update 2011-07-18 21:01: formatting, also added rewrite rule for nginx to cope with uploaded media path change_

Day 1-2: Installation

Instead of fixing what I wanted (subdirectory handling), I worked with installation instead.

There are quite a few tickets opened but this is the one which wasted most of my time. The result is pretty good though: now it’s possible to install Danbooru without giving superuser privilege to the database account used. Installation still requires one though.

Danbooru 2010 personal plan

Note this is personal plan and I’m not an official Danbooru submitter. Here’s what I’m planning for this year:

  • Finish the remove-all-those-absolute-uris project from last year
  • Validation
  • Integrate JS with Rails (PrototypeHelper etc)
  • Localization
  • Documentation
  • ?

What I’ve been watching lately

Bones’ titles. Darker than Black (Yin o/)and its second season (Suou o/) and then currently watching Eureka Seven (on hold at episode 29 right now – getting sleepy).

About 66 episodes. The highest I’ve achieved in this few years. I just never able to watch anything in peace since few years ago because of… stuffs. Various reasons caused me to not able to watch as many episodes as I can compared to 2005 and before. I rarely marathon a 4-cours title. Only once actually as far as I remember: Gundam SEED (which costs me few hours of classes and CD-Rs – lots of em).

Looks like this year I’ll be able to finish much more titles than I did before 😀

On another note, I watched every single new series this winter. And noticed only one (from about eight) titles which is not a moeblob/fanservice title. There are still some more winter titles yet to air so this number will be changed but the ratio will still be unbalanced.

Study List 2010 and up

Too many to learn, too short time.

High priority. Things I want and/or need to study in this 1-6 months:

  • SQL and PL/SQL: Job requirement.
  • Java: Job requirement.
  • Ruby and Ruby on Rails: Personal choice. Mainly because danbooru is using it and it’s got the easiest module management (compared to Perl, Python and PHP)
  • Javascript/AJAX/AJAJ: Who develop web in 2010 without this? Me. I need to know at least the scripts used in danbooru.

Normal priority. Not really needed but I want to learn in-between learning items listed above:

  • Bourne Shell and awk: Need to learn better writing style and I’ve never actually learned awk. I sed/cut/grep all the way until today (and maybe for next few weeks until I learned awk)
  • Perl: If only because it’s got the highest amount of modules.
  • C: To fix/improve/hack many things. Mainly nginx and pure-ftpd.
  • English (conversation): My conversation skill sucks. Not saying my writing/listening/reading is good, but at least better than conversation.
  • Japanese: …

Low priority. Not needed for this few months but I must remember to learn it one day or learn whenever I feel like:

  • Algebraic Structure: Required for cryptography. It’s like building things with lego and trying understand them. IYKWIM. Interested in does not mean capable of.
  • Cryptography: Mainly because I want to completely understand this.
  • Graph: Hurrr.
  • Theories in logic: Nothing is more fun than attacking arguments at structure level :>

Better Autoindex with nginx/php

Using capability of nginx.

Basically, add this block

        location @lister
                fastcgi_pass unix:/tmp/php-fcgi.sock;
                fastcgi_param PREFIX $_list_prefix;
                fastcgi_param FILE_ROOT $_list_root;
                fastcgi_param SCRIPT_FILENAME /srv/http/lister.php;
                include fastcgi_params;

(adjust the path to lister.php and php-fcgi)

And then whenever you want to autoindex a folder just add

        location /anime/win/ {
                set $_list_prefix /anime/win;
                set $_list_root /srv/ftp;
                alias $_list_root/;
                try_files $uri @lister;

And you’re done.

The code still needs some cleanups though.

[ lister.php ]