Category Archives: blog

Fruitbots, a JS bot challenge

Fruitbots challengeI sometimes like to join bot challenges to improve my programming skills and logic reasoning.

Last week I discovered Fruitbots, a JavaScript bot challenge created by the Scribd staff. Like every good challenge of its type, it features simple rules and a clear bot API, also it can be scripted in 4 languages: Python, Lua, Ruby and JavaScript.

The Fruitbots world is a board with different kind of fruits lying around. The goal is to collect more fruits than the opponent bot, of many types as possible.

Continue reading

Deploying in 2013, from Grunt to Amazon S3

What is your deploying chain right now? How has it changed over time?

Deploying in 2013

The actual deploy of a single page app I’m involved is based on a single Grunt script, executing on a Node.js environment.

The Grunt chain takes all the files (Backbone.js app, JS libs, HTML templates, CSS and images), checks, copies, concatenates and minificates them.

Continue reading

How to update the remote content of a Modal in Twitter Bootstrap

Twitter Bootstrap is a very good tool with beautiful graphics and lots of tiny useful objects.

The Modal object is nice and lightweight, and is also able to load remote content. I liked it and wanted to use it on a list of links, loading new content every time a link was pressed.

The problem

Unfortunately, I found that the Modal remote content load feature works only the first time the object is used! Once a Modal object is instantiated, it is persistently attached to the element specified by data-target; subsequent calls to show it will only call toggle() on it, but will not update its content. This is because the remote load is done in the constructor of the Modal object, so even changing its properties, the content won’t be updated.

Continue reading

How to implement a custom file manager in TinyMCE 4

The TinyMCE 4 javascript editor supports HTML5 and features a new interface and a complete rewrite of all plugins. TinyMCE is the standard WYSIWYG editor for online CMS and websites: if you have a custom file manager attached to the image button, it’s time to think about updating its loading code. To do this in minutes, you can add a quick hack to the new image plugin. Of course, this tutorial covers a standard approach not related to any File Manager in particular. Your final working code will be strictly related to the File Manager in use.

Continue reading

MySql performance optimization tricks

MySql performance optimization is an interesting task, I like to focus on it on my free time.

Please note that these are house rules. There is no guarantee that your performance will improve. Use with precautions!

key_buffer_size

An important variable setting is key_buffer_size; a good value is the 20% of total RAM.

Here it is a sample:

key_buffer_size = 820M

max_connections

Also, the max_connections variable could be safely lowered from its default value. Take a look at your Max used connections status variable; you can safely set the max_connections to Max used connections x 5, with a minimum of 40.

Sample:

max_connections = 85

tmp_table_size and max_heap_table_size

Finally, it’s important to take a look to tmp_table_size and max_heap_table_size. You can get a good value for them by dividing the available RAM by the max_connections variable.

Sample:

# Total RAM: 4GB; Mysql supposed available RAM: 3GB; Max_connections: 85;
# Good Value = 3GB / 80 = 35MB
tmp_table_size = 35M
max_heap_table_size = 35M

Thank you 500000!

This is a special day for our little project! The Really Simple Share plugin just reached 500,000 downloads; at the same time our Really Simple Twitter Widget plugin reached 100,000 downloads.

We’re busy keeping them (and the other plugins) update and working. At the moment we’re focusing on the Twitter side, making every plugin API 1.1 compliant.

Thank you everyone, for your requests and support!

Cool companies using WordPress in Rome

Plugin development for WordPress in Rome? Yes we can!

Today the 2.9 release of Really simple Facebook Twitter share buttons for WordPress is out, with a brand new Pinterest implementation… I recommend you to update quickly because Pinterest backward compatibility is virtually non-existent.

In the meanwhile, here are some links of cool italian companies, using WordPress in Rome  on a daily basis and active on free plugin development.

I worked with them, they’re talented people: