tomo's blog

Mafia Wars bugs

Submitted by tomo on September 29, 2010 - 3:40am

After playing Mafia Wars for awhile, I've noticed some bugs recently. They are in the way certain strings are formatted.

'You were snuffed in the fight, losing 6 experience points%FMT_SPAND_END%'

'%OPPONENT% asked their Mafia to attack you. Fight them back now'

Read the rest of this article...

Movie Theaters in Saigon

Submitted by tomo on September 11, 2010 - 7:56pm

Does anybody aggregate movie theater show times for Ho Chi Minh City? Here's where I get my information, from disparate sources on poorly designed Vietnamese websites:

Cinebox
212 Lý Chính Thắng, Q.3 (near Kỳ Đồng)
240 Đường 3/2, Quận 10 (Hòa Bình, huge place)
http://www.cinebox.vn/index.php?page=schedule&step=1

Galaxy
116 Nguyễn Du, Q.1,
230 Nguyễn Trãi, Q.1
246 Nguyễn Hồng Đào, Q.Tân Bình
http://www.galaxycine.vn/?cine=calendar&search=cinema

Megastar
Hung Vuong Plaza
CT Plaza
http://megastar.vn/index.aspx

And then there's always free movies at:
Bobby Brewers
45 Bui Vien, P.Pham Ngu Lao. Q.1
86 Pham Ngoc Thach, Q.3
306/8 Nguyen Thi Minh Khai, Q.3
179 Tran Huy Lieu. Q.PN
http://www.bobbybrewers.com/bv_schedule.html

Read the rest of this article...

Cygwin mkshortcut Unicode Windows filename support

Submitted by tomo on September 8, 2010 - 1:03am

Cygwin comes with utilities for dealing with Windows-style shortcut files. readshortcut will output the file path that a shortcut links to (and more) and mkshortcut can create Windows shortcuts. However, there is currently one limitation. Windows filenames are in Unicode and have certain other limitations that Posix filenames do or don't have. The current Cygwin mkshortcut doesn't deal with such Unicode filenames. However, you can patch it so that it does.

1. Get source for all Cygwin utils at: http://gnuwin32.sourceforge.net/packages/cygutils.htm

Read the rest of this article...

Mafia Wars tournament in Las Vegas: Uh oh!

Submitted by tomo on September 7, 2010 - 1:38pm

Zynga's Mafia Wars Facebook text-based game is experiencing all kinds of performance issues right now. And to top if off, if you try to fight in a tournament in Las Vegas you'll see the message:

"Uh oh. We were unable to retrieve a tournament bracket for you. Please try again later"

But only after they deduct your stamina and coins! This happens every 4 hours so it's better to avoid playing in the tournament for now!

Pligg long running queries

Submitted by tomo on September 7, 2010 - 2:20am

 

 

For awhile I've been plagued with these long running queries on my Pligg site that were running up CPU:
 
SELECT DISTINCT pv_user_id, pv_type, pv_page_id FROM mypligg_pageviews GROUP BY pv_type, pv_page_id, pv
 
And so I was running the mkill Perl script to kill any queries taking longer than a minute to complete.
But recently even that stopped working, leaving queries in the Killed state but still running up CPU.  They were all stuck in "converting HEAP to MyISAM".  Did some diagnostics:
 
mysql> SHOW GLOBAL STATUS LIKE 'Created_tmp_tables';
+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| Created_tmp_tables | 196   |
+--------------------+-------+
1 row in set (0.01 sec)
 
mysql> SHOW GLOBAL STATUS LIKE 'Created_tmp_disk_tables';
+-------------------------+-------+
| Variable_name           | Value |
+-------------------------+-------+
| Created_tmp_disk_tables | 159   |
+-------------------------+-------+
1 row in set (0.01 sec)
 
mysql> show variables like 'tmp_table_size';
+----------------+----------+
| Variable_name  | Value    |
+----------------+----------+
| tmp_table_size | 33554432 |
+----------------+----------+
1 row in set (0.01 sec)
 
 
So it seemed there wasn't enough memory to perform the conversion without going to disk which is not what we want.  So I set tmp_table_size and max_heap_table_size to larger values, max_heap_table_size too because MySQL uses the lesser of the two.
 
mysql> set tmp_table_size=100000000;
Query OK, 0 rows affected (0.00 sec)
 
mysql> set  max_heap_table_size=100000000;
Query OK, 0 rows affected (0.01 sec)
 

And now we're golden, CPU back down to normal levels and queries finishing.

Read the rest of this article...

Theme developer saving to wrong temp directory

Submitted by tomo on September 7, 2010 - 1:36am

After importing a database for a Drupal site from a different server, you may see errors such as:

warning: file_put_contents(/devel_themer_19527646904c852428ef200) [function.file-put-contents]: failed to open stream: Permission denied in /home/tomo/xxx/sites/all/modules/3rdparty/devel_themer/devel_themer.module on line 638.

And if you try to select an element:

Ajax variables file not found.

What's going on here is the files aren't being written to the temp directory which is a Drupal variable stored in the database.  Delete the row from the variables table where name is file_directory_temp and then Drupal will automatically set the variable to the correct directory.

delete from variables where name='file_directory_temp';
or
delete from variable where name='file_directory_temp';

Read the rest of this article...

First post

Submitted by tomo on September 6, 2010 - 11:10pm

I've decided to start blogging to encourage myself to do things worth writing about.

Syndicate content
© 2010-2014 Saigonist.