Sorry for not updating for a while guys.
Spent almost $100 on hardware and stuffs, worked for more than a month, Whack-a-mole over telephone is finally completed!
各位! 好耐無打廣東話嘅blostpost. 耗資陸佰港元. 動工參拾陸夜. 小弟嘅電話扑傻瓜終於搞掂喇!
Behold the gameplay(Cantonese with English subtitle)!
The gameplay is simple. First, dial the number 5517 6408 in Hong Kong(does not accept international call, Cantonese only). Then, when you hear certain sound, you'll have to press certain key. The sounds and the keys are randomly generated. If you press the correct one, you get a score. When it reaches the threshold, the difficulty will be increased as shown below:
Level 1: Score requirement: 0; Three random animal sounds. Each requires the player to press a key.
Level 2: Score requirement: 10; Three additional random synth'd wave sounds. Each requires the player to press a key.
Level 3: Score requirement: 30; Three additional random voice of numbers. Each requires the player to press another key that is usually inconsistent with the number that the player have heard.
Level 4: Score requirement: 60; After this level, the player has to press certain key for every 5 sounds, regardless what is the sound that the player has heard.
Level 5: Score requirement: 100; Upon hearing any of 5 random sounds, the players has to press a key. Upon hearing another 5 random sounds, the players has to press another key. Upon hearing yet another 3 random sounds, the player has to press yet another key.
遊戲玩法好簡單. 首先打5517 6408(唔收國際電話, 唔收133電話), 跟住佢就會叫你聽到某D聲就要撳某D制. D聲同D制係隨機嘅. 撳啱加分. 夠分就LEVEL UP:
LEVEL 1: 所需分數: 0; 三個隨機動物聲. 每個聲要撳一粒制.
LEVEL 2: 所需分數: 10; 三個隨機電腦合成聲. 每個聲要撳一粒制.
LEVEL 3: 所需分數: 30; 三個隨機數字聲. 每個聲要撳一粒制, 而嗰粒制通常唔係你聽到嗰個數字嘅聲.
LEVEL 4: 所需分數: 60; 每聽到五個聲就要撳某一粒制.
LEVEL 5: 所需分數: 100; 聽到某五種聲要撳一粒制. 聽到另外某五種聲要撳另一粒制. 聽到另外某三種聲又要撳另一粒制.
If you press the wrong key, or if you're too slow, then you lose. If your score is the highest among everyone else, the score will be recorded.
如果你撳錯制或者撳得太慢就會輸. 如果你嘅分數係最高嘅話, 個分將會被記錄.
Alright! That's it for the first part of the blogpost. The second part will be about the technical details of this project. See you! :)
Better to be late than never announcing it. The Poland Event website is closed.
The hoster could not pay for the hosting fee. Therefore, the site is closed about a month after the begin of the event.
Considering that the hoster is relatively young, he is a genius of being capable for setting up a website for the event.
Give a big hand to Eruverio! Our hoster/organizer of the RPS tournament 2016!
We will definitely host another event next year! I'll probably find someone who is capable for keeping the site alive for at least a few years.
The system runs out of RAM
Kill RAM intensive processes, or use swap.
I have installed CUPS on my Raspberry Pi. It was connected to a USB printer and made it accessible via my LAN. It had been working very well until the recent. In these few weeks, somehow the printer does not print.
I entered the CUPS web interface of my Raspberry Pi and tried printing a test page. Funny enough. It claimed that the print job was completed, despite that the printer did nothing.
Then I dig up /var/log/cups/access_log. Here is what's inside.
localhost - - [10/May/2016:14:37:12 +0800] "POST /printers/Canon_MG2400_series HTTP/1.1" 200 422 Print-Job successful-ok
It claimed that the print is a success. Obviously that's not true!
Then I dig up /var/log/cups/error_log. Unfortunately, there was nothing inside.
Then I started trying stuffs like:
None worked! :(
Then I figured out that there is something called LogLevel in CUPS config. I modified it as follows:
And I restarted CUPS. Then I noticed the following messages appeared in /var/log/cups/error_log:
D [10/May/2016:14:37:20 +0800] [Job 136] Error: /undefined in --setpagedevice-- ... D [10/May/2016:14:37:20 +0800] [Job 136] Last OS error: Cannot allocate memory D [10/May/2016:14:37:20 +0800] [Job 136] GPL Ghostscript 9.05: Unrecoverable error, exit code 1 ... I [10/May/2016:14:37:22 +0800] [Job 136] Job completed.
What? Obviously something went wrong! How on the earth could the level of that message merely be a debug? I think that should be at least a warn! More importantly, how come it is called "Job completed"? I think that should be "Job Failed" instead! :<
After that, I increased the swap space. And remote printing starts working again. :D
Took me a few hours to figure that out. I couldn't find this solution in Google. That's why I blog about this. Hopefully someone somewhere would somehow find this blogpost helpful.
UPDATE: I've filed a bug report to the CUPS developers. Hopefully it will be fixed soon.
Thanks to Let's Encrypt. We can now get SSL certificates for free!
I was slacking off while doing homework. That's why I did the HTTPS setup yesterday. :P
Currently, only some of the subdomains of sadale.net supports HTTPS. I'd like to test it for a while before enabling it for all of the domains.
Many image links in blogposts are still having http:// prefix . I'll convert them to https:// when I got time.
Finally the website of Asynchronous Rock Paper Scissors Tournament 2016 - Poland is ready!
To make the event more internationalized, it will be hosted by different country every year! The coming event will be hosted by Poland.
To join the event, just fill in the form in the site with your nickname, nickcountry and the hands to be played in 1st April UTC. After that, you can wait for the release of the result in 2nd April UTC.
Have fun in the coming April Fool's Day!