Announcing ecos – the collection of crappy scripts I wrote

Included in the package:

  • bash initialization script, mainly tested on OpenIndiana but should also good for Linux, *BSD and other *nix
  • tcsh initialization script. Mainly tested on FreeBSD
  • my hgrc. Obviously shouldn’t be used as is except if you want to give me the copyright of whatever you’re committing
  • tmux config. Blue bars instead of green. And minor tweaking
  • vimrc. Guaranteed to break vim-lite or whatever the default vi in Ubuntu. Also shouldn’t be used for most administrative task where tab should be tab and it should be 8 spaces long. Mainly for ruby development.
  • inputrc. Makes various application using readline much more awesome – especially if you’re not emacs user
  • Various scripts:
    • cek: check crc32 of a file and compares with the one in filename if exists. Useful for checking downloaded anime. Requires ruby
    • ed2k: generates ed2k link of a file. Useful for comparing against anidb database. Ruby is required.
    • putcrc: as the name says, puts crc32 of the file in its filename. Also requires ruby.
    • ren: rename anime files with whatever I like. In perl. Contains hundres of regexes. No test so it tends to break at unfortunate time.

Grab them here: [ bitbucket/edogawaconan/ecos ]

Status of mplayer’s screenshot filter

Basically speaking, the API for cleanly generate screenshot filename based on currently played name and time is not available yet.

In a bit more detail, the variable mpctx->filename is not passed to the vf.c which then not passed to vf_screenshot.c. My current hack involves moving mpctx to global variable and use it in vf_screenshot.c when generating filename. It works but really hack-ish. At least my directory now contains informative screenshot filename instead of shot####.png (which isn’t quite compressed png either).

And no, I don’t know C.

Audio volume control from shell in OpenIndiana

I might be missing something but the volume control for OpenIndiana is a bit lackluster in display department compared to FreeBSD’s. In FreeBSD, whenever I do a volume change I get to see the values; before and after – but not in OpenIndiana; its default shell-based mixer quite sucks and doesn’t give enough feedback whenever I change volume.

There’s a good reason I keep bash as my main shell – I can script in POSIX sh and keep the sane shell at the same time (as opposed to using actual POSIX sh). So here’s the function I recently created; when given no parameter will display current volume and when given one parameter will change the volume and display how the change goes.

vol() {
getvol() { audioctl show-control volume | awk ‘/^volume/ { print $2 }’; }
printf “%s: ” “Volume”
if [ -n “$1” ]; then
printf “%s => ” “$(getvol)”
audioctl set-control volume “$1”
fi
printf “%sn” “$(getvol)”
}

It should be pretty much POSIX but remember that it will only work in Solaris Express 11 (probably) and OpenIndiana (tested with oi_148).

Solaris zones’ (first) boot error

If you encounter error like this on first zone boot:

SunOS Release 5.11 Version oi_148 64-bit                                        
Copyright (c) 1983, 2010, Oracle and/or its affiliates. All rights reserved.    
svc.configd: Fatal error: "boot" backup failed: rename(/etc/svc/repository-boot-tmpHSa4Hq, /etc/svc/repository-boot-20110427_123458): Permission denied         
svc.configd: Fatal error: unable to create "boot" backup of "/etc/svc/repository.db"                                                                            
Loading smf(5) service descriptions: 98/98                                      
svc.configd: Fatal error: "manifest_import" backup failed: rename(/etc/svc/repository-manifest_import-tmpJSa4Hq, /etc/svc/repository-manifest_import-20110427_123527): Permission denied                                                        
svc.configd: Fatal error: Backend copy failed: rename /etc/svc/repository.db-KSa4Hq to /etc/svc/repository.db: Permission denied                                
svc.configd: Fatal error: Backend copy failed: remove /etc/svc/repository.db-KSa4Hq: Permission denied                                                          
Requesting System Maintenance Mode                                              
(See /lib/svc/share/README for more information.)                               
svc:/system/early-manifest-import:default exited with status 95                 
                                                                                
Enter user name for system maintenance (control-d to bypass):

Check your zfs setting, particularly nbmand and atime parameter. I myself set nbmand to off and atime to on for the zones’ zfs filesystem and it booted fine.

mplayer2 on openindiana

Some points:

  • Yes, it’s doable. Use mplayer2-build helper
  • You have to install many things (mainly autotools and don’t forget system audio header). Also yasm from opencsw
  • With regard to autotools, you have to create symlink for few things and put it somewhere in your PATH, preferably before everything else (namely ginstall -> install, aclocal-1.10 -> aclocal, automake-1.10 -> automake)
  • Add –cc=gcc to common_options

Probably there are some more but that’s all I can remember right now. Should also applicable for opensolaris (why are you still using it) and Solaris Express 11.

If you want to enable SSE support, you have to apply some patches to mplayer.

If you want to use vdpau while using nvidia’s latest driver, you have to install libvdpau.

A Bridge to the Starry Skies episode 1 – ah right


An obaa-san whom doesn’t like being called one but used jokes fitting her age.

I should learn from her.

Finally some classic stuff, and not too bad at that. Don’t know what the deal with the shota but I don’t think it’s that awesome.

Anyways, it followed the introduction from previews which is about the actual (and relevant to the story?) things happened in this episode.

We, Without Wings episode 1-3 – who’s who again?

 

Nishimata Aoi. Navel. Eroge adaptation. Hashimoto Miyuki. They’re all normal stuff…

…but overly huge amount of cast? Three protags? Is this trying to be some kind of Durrr?

Herp derp I can’t even remember any of their names. Not even the panty-flashing loli. So, um, I hope it actually delivers something. Or at least mindless fanservice should be good once in a while (liessssssssssssssssssssssssssss).

Make sense, this post doesn’t.

The ABCs of Blooming episode 1 – Um, what

Okay, I don’t know what to expect besides the fact that it is animated by P. A. Works.

Even after watching first episode, I still don’t what to expect. We have a genki-girl, a yuri-ish girl, a kuudere girl and somewhat harsh grandmother. And some more.

Animation is usual P. A. Works. We’ll see where it goes from now on. I’m not really familiar with this setup after all so I’ll refrain from guessing anything.

Random Photo of the Day #2

While waiting for this shit called MySQL Cluster finishing whatever it is doing, I figured this would be a nice time to do another random photo post.

100% less anime-ish this time. Jakarta Selatan, before the freaking construction work takes place and created (even more) massive traffic jam everyday.

Rio – Rainbow Gate – LOL

I don’t even know how I can keep watching this until the end.

OOPARTS. Freaking OOPARTS.

Well, considering the whole roll ruler thingy (and ghosts, esper, etc), it’s not that surprising. Overall crappy series (OMG WHO WOULD’VE GUESSED). But at least in the last few seconds we get this:

Hint for second season? Seriously? Or maybe Xebec just felt like to draw some loli to balance things out. Lol.

Mahoutsukai no Yoru – Trailer

Apparently I still do encode. Or something. It’s the next Duke Nukem Forever. Or maybe not. Whatever.

I originally intended to use this post as a chance to show off my awesome mahoyo poster in my room but forgot to take one (I’m at office atm).

No ddl because I’m lazy. You can post the ddl if you feel like to.

Apparently will be subbed by anime-rg but we’ll see if it actually happens.

Update: shit, I forgot to set correct aspect ratio. Patch available.

[ Torrent (v2) | Patch ]

PS: using page=torrentinfo when submitting nyaa’s link to TokyoTosho is gay.

Server moved again

If you can see this post, you’ve come to the new server.

So, um, I bought a cheaper VPS package but this time for one year. Running loldebian since I’m having problem running FreeBSD in a KVM (calcru timer running backward or something in that effect). Things seems to be a bit slow as there are less usable memory – down from 256 MiB to 128 MiB. I guess I need to figure out how to install php-fpm painlessly to keep memory usage low.

I suck at mahjong

I was like, 90% of time at last position. With 1% at first position. Or maybe less.

Numbers pulled straight out of thin air.

It’s true that I’ve been losing too much though. Also it looks like I’m going down from 1-dan again soon.

Remember guys, when someone declared riichi, play defensively. It doesn’t matter how good your hand is – you can always rebuild your hand at later games as long you’re still alive. Pure guts doesn’t work.

Dear WordPress

Please stop breaking my posts. And please remove this crappy “editor”.

Update: turns out one of the plugin (check broken links) caused this whole mess. Doesn’t change the fact that WP’s editor is shit though.

Debian’s sources.list

I kept forgetting them whenever I need one so I’ll put mine here and be happy:

###### Debian Main Repos
deb http://http.debian.net/debian squeeze main contrib non-free
#deb-src http://http.debian.net/debian squeeze main contrib non-free

###### Debian Security Update Repos
deb http://security.debian.org squeeze/updates main contrib non-free
#deb-src http://security.debian.org squeeze/updates main contrib non-free

###### Debian General Update Repos
deb http://http.debian.net/debian/ squeeze-updates main contrib non-free
#deb-src http://http.debian.net/debian/ squeeze-updates main contrib non-free

###### Debian Backports Repos
deb http://http.debian.net/debian-backports squeeze-backports main contrib non-free
#deb-src http://http.debian.net/debian-backports squeeze-backports main contrib non-free

###### Dotdeb Repo
#deb http://packages.dotdeb.org squeeze all
#deb-src http://packages.dotdeb.org squeeze all

It should cover mostly used packages and will keep me sane. Also debian-volatile has been replaced with debian-updates (god knows why it’s called like that) since squeeze (6.0) but in case I need to take care a lenny or earlier (derp) machines, this should also be added:

deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free

Oh and Debian/kFreeBSD within a FreeBSD system is quite funny.

Update 2012-12-27: Use improved CDN.