Is your Netbeans running slower? Try this trick.

I use NetBeans 6 all the time on my laptop and have learned how to configure it
to run more effectively for me.
NetBeans, like any Java application needs room to work, and the default memory settings
for Java and NetBeans are usually not what I consider ideal.
Of course how would they know what is ideal, you need to tell it.
Granted my solution may not be ideal for others, but it’s worth playing with.
I’m using jdk6 update 17.
And even this should work for NetBeans 6, this should work on any platform.

on MAC/Linux/Windows netbeans/6.0/etc/netbeans.conf
netbeans_default_options="-J-Xms256m -J-Xmx512m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m
-J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true -J-XX:+UseConcMarkSweepGC
-J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled"

Any change to this file will require a reboot.

Also, turn on the View->Toolbars->Memory to keep track of the NetBeans memory usage, clicking
on it will force a GC, and you can get a feeling for how much memory your NetBeans
session needs, making adjustments to the maximums above.
And my recommendation is that the maximum (-J-Xmx) setting should never be more than
the RAM on the machine minus 512m, or system memory thrashing may occur.

Additional information can be found at
the NetBeans FAQ on GC pauses
and
the NetBeans FAQ on configuration.

The above settings make a world of difference in the way NetBeans performs for me.

Run acts_as_solr in JRuby in background mode

When you try and run rake solr:start or rake solr:stop it uses Kernel.fork to spawn of a child process. However in JRuby this is disabled by default due to concurrency issues. And this prevents your solr rake tasks from running under a JRuby environment…

The Problem

When you try and run rake solr:start or rake solr:stop it uses Kernel.fork to spawn of a child process.
However in JRuby this is disabled by default due to concurrency issues. There is an option to enabling fork (jruby -J-Djruby.fork.enabled=true)
within JRuby but it is experimental and as the warning says, “WARNING: fork is highly unlikely to be safe or stable on the JVM.” as it can cause all sorts of weird and wonderful side-effects.

The Solution

The solution therefore is to simply alter the solr:start and solr:stop tasks to use Kernel.exec instead.
To do this find the solr rake tasks usually in {RAILS_ROOT}/vendor/acts_as_solr/lib/tasks/solr.rake. In the start task all that is required is to comment out the start of the fork block. so you only have the exec method call,
This will not start the solr process in the background. To do so you just have to add “&” at the end of the exec command, which causes the jar file to run in background mode.

task :start do
      require "#{File.dirname(__FILE__)}/../../config/solr_environment.rb"
      begin
        n = Net::HTTP.new('127.0.0.1', SOLR_PORT)
        n.request_head('/').value

      rescue Net::HTTPServerException #responding
        puts "Port #{SOLR_PORT} in use" and return

      rescue Errno::ECONNREFUSED #not responding
        Dir.chdir(SOLR_PATH) do
            exec "java #{SOLR_JVM_OPTIONS}
-Dsolr.data.dir=#{SOLR_DATA_PATH} -Djetty.logs=#{SOLR_LOGS_PATH}
-Djetty.port=#{SOLR_PORT} -jar start.jar &"
          sleep(5)
          File.open("#{SOLR_PIDS_PATH}/#{ENV['RAILS_ENV']}_pid", "w"){ |f| f << pid}
          puts "#{ENV['RAILS_ENV']} Solr started successfully on #{SOLR_PORT}, pid: #{pid}."
        end
      end
    end

and in the end task just comment out the begining of the fork block so you are left with

  task :stop do
    require "#{File.dirname(__FILE__)}/../../config/solr_environment.rb"
      file_path = "#{SOLR_PIDS_PATH}/#{ENV['RAILS_ENV']}_pid"
      if File.exists?(file_path)
        File.open(file_path, "r") do |f|
          pid = f.readline
          Process.kill('TERM', pid.to_i)
        end
        File.unlink(file_path)
        Rake::Task["solr:destroy_index"].invoke if ENV['RAILS_ENV'] == 'test'
        puts "Solr shutdown successfully."
      else
        puts "PID file not found at #{file_path}. Either Solr is not running or no PID file was written."
      end
  end

you should now be able to run your solr rake tasks under jruby with out any problems..

Ruby Mixin Tutorial

In Java you just have classes (both abstract and concrete) and interfaces. The Ruby language provides classes, modules, and a mix of both. In this post I want to dive into mixins in Ruby.

In the Ruby language a mixin is a class that is mixed with a module. In other words the implementation of the class and module are joined, intertwined, combined, etc. A mixin is a different mechanism to the extend construct used to add concrete implementation to a class. With a mixin you can extend from a module instead of a class. Before we get started with the mixin examples let me first explain what a module is.

I think of a module as a degenerate abstract class. A module can’t be instantiated and no class can directly extend it but a module can fully implement methods. A class can leverage the implementation of a module by including the module’s methods. A module can define methods that can be shared in different and seperate classes either at the class or instance level.

Let me define a module, albeit a trivial one, that would convert a numeric integer value to English.

# Convert a integer value to English.
module Stringify
  # Requires an instance variable @value
  def stringify
    if @value == 1
      "One"
    elsif @value == 2
      "Two"
    elsif @value == 3
      "Three"
    end
  end
end

Note that the Stringify module makes use of a @value instance variable. The class that will be mixed with this module needs to define and set a @value instance variable since the Stringify module uses it but does not define it. In addition to instance variables a module could invoke methods defined not in the module itself but in the class that it will be mixed with.

Now let me construct a self contained module that is not dependent on the implementation of any class that it can be mixed with.

# A Math module akin to Java Math class.
module Math
  # Could be called as a class, static, method
  def add(val_one, val_two)
    BigInteger.new(val_one + val_two)
  end
end

The methods in the Math module are intended to be invoked like class methods, also known as static methods. The add method in the Math module accepts two integer values and returns an instance of BigInteger. Let me now define the mixin BigInteger class.

# Base Number class
class Number
  def intValue
    @value
  end
end

# BigInteger extends Number
class BigInteger < Number

  # Add instance methods from Stringify
  include Stringify

  # Add class methods from Math
  extend Math

  # Add a constructor with one parameter
  def initialize(value)
    @value = value
  end
end

I loosely modeled the BigInteger and Number classes after the Java versions. The BigInteger class defines one constructor and directly inherits one method from the Number base class. To mix in the methods implemented in the Stringify and Math modules with the BigInteger class you will note the usage of the include and extend methods, respectively.

# Create a new object
bigint1 = BigInteger.new(10)
# Call a method inherited from the base class
puts bigint1.intValue   # --> 10

The extend method will mix a module’s methods at the class level. The method defined in the Math module can be used as a class/static method.

# Call class method extended from Math
bigint2 = BigInteger.add(-2, 4)
puts bigint2.intValue   # --> 2

The include method will mix a module’s methods at the instance level, meaning that the methods will become instance methods. The method defined in the Stringify module can be used as an instance method.

# Call a method included from Stringify
puts bigint2.stringify   # --> 'Two'

There is another use of the extend method. You can enhance an object instance by mixing it with a module at run time! This is a powerful feature. Let me create a module that will be used to extend an object, changing it’s responsibilities at runtime.

# Format a numeric value as a currency
module CurrencyFormatter
  def format
    "$#{@value}"
  end
end

To mix an object instance with a module you can do the following:

# Add the module methods to
# this object instance, only!
bigint2.extend CurrencyFormatter
puts bigint2.format   # --> '$2'

Calling the extend method on an an instance will only extend that one object, objects of the same class will not be extended with the new functionality.

puts bigint1.format   # will generate an error

Modules that will be mixed with a class via the include or extend method could define something like a contructor or initializer method to the module. The module initializer method will be invoked at the time the module is mixed with a class. When a class extends a module the module’s self.extended method will be invoked:

module Math
  def self.extended(base)
    # Initialize module.
  end
end

The self prefix indicates that the method is a static module level method. The base parameter in the static extended method will be either an instance object or class object of the class that extended the module depending whether you extend a object or class, respectively.

When a class includes a module the module’s self.included method will be invoked.

module Stringify
  def self.included(base)
    # Initialize module.
  end
end

The base parameter will be a class object for the class that includes the module.

It is important to note that inside the included and extended initializer methods you can include and extend other modules, here is an example of that:

module Stringify
  def self.included(base)
    base.extend SomeOtherModule
  end
end

Center Page Horizontal & Vertical with plane CSS & HTML

Vertical centering has always been awkward with css as vertical-align only refers to inline elements within a single line and not to block level elements. However vertical align does apply to table-cells also so we can use this to our advantage in browsers that support display:table such as mozilla and opera.

We can also cater for all IE (IE5 – IE7) via conditional comments and supply them with their own vertical centering routine.

Firstly I’ll describe what’s needed for mozilla. Here’s the main css code:

Code:

* {margin:0;padding:0}
/* mac hide \*/
html,body{height:100%;width:100%;}
/* end hide */
body {
background-color: #cccccc;
text-align:center;
min-height:468px;/* for good browsers*/
min-width:552px;/* for good browsers*/
}
#outer{
height:100%;
width:100%;
display:table;
vertical-align:middle;
}
#container {
text-align: center;
position:relative;
vertical-align:middle;
display:table-cell;
height: 468px;
}
#inner {
width: 552px;
background:red;
height: 468px;
text-align: center;
margin-left:auto;
margin-right:auto;
border:1px solid #000;
}

The html would look like this:

Html:

<body>
<div id=”outer”>
<div id=”container”>
<div id=”inner”>
<h1>Centered Vertical and Horizontal</h1>
</div>
</div>
</div>
</body>

Most of the above should be familiar to you but the bit we are interested in is the display:table in #outer. This tells the browser to display this element with the same characteristics of a table which allows us to then use vertical-align:middle. We then nest an inner #container that is set to display:table-cell and this table-cell will then be vertically aligned to the parent as would a table cell.

The inner #inner element is then horizontally centered using margin:auto and that completes the solution for mozilla and Opera. It’s a shame that we need the extra wrappers but this is the safest way to do this. Unlike other vertical centering methods (where you position the element 50% from the top and then drag it back up with a negative top margin equal to half the elements height) the method I describe will always stay in the viewport and will not slide off the top or the side of the screen which is a bad failing of other methods used.

To bring IE into the game we need to do something else because it doesn’t understand display:table. Luckily we can draw on a behaviour that is consistent from ie5 – ie7 and simply involves positioning the outer element 50% from the top using relative positioning and the dragging the inner element back up with a negative 50% relative top position. In other browsers this would bring the element back to the same position but IE drags the inner element back only half its height therefore perfectly centering the element.

Code:

<!–[if lt IE 8]>
<style type=”text/css”>
#container{top:50%}
#inner{top:-50%;position:relative;}
</style>
<![endif]–>

We also need to add overflow:hidden to the outer for IE7 otherwise we get a vertical scrollbar where its not needed.

<!–[if IE 7]>
<style type=”text/css”>
#outer{
position:relative;
overflow:hidden;
}
</style>
<![endif]–>

Nothing else needs to be changed as IE7 and under doesn’t understand display:table and just ignores it. The html stays the same and the only extra css is the 2 lines above. It couldn’t really be much simpler.

10 Essential Plugins For Your Wordpress Portfolio

One of the best things about Wordpress is the thousands of plugins available for free. No matter how you want to customise your site, there’s probably a plugin to do it. From turning it into an ecommerce store to automatically pulling in content, the possibilities are endless.

When it comes to portfolio sites, you don’t really need a lot of bells and whistles. Your portfolio is all about your work and presenting it in the best possible way, so which Wordpress plugins are the best to achieve this? Which will help your Wordpress portfolio really perform?

Tweet This

Chances are you have a Twitter account, so what better way to show off your work than to put it in front of your followers? The Tweet This plugin installs a cool button on all of your posts and pages, allowing people to Tweet a link to your work. It can also be set up to Tweet new posts so you don’t have to sign up to a service like Twitterfeed.

Our favourite thing about this plugin is that it lets you shortern URLs using a service of your choice. If you’ve got your own URL shortener this is very nifty indeed.

Sociable

Fantastic for generating traffic spikes, Sociable lets you add social bookmarking links on your posts, pages and RSS feeds. Good art, design or photography is social networking gold, so this is definitely a plugin you want to install.

Xavins Review Ratings

It might be a bit old-school, but star ratings are great for visitor interaction. Our favourite plugin for this is Xavin’s Review Ratings. It’s entirely customisable from the number of stars to the size of the fractions to the design of the stars themselves. Intended mainly for review websites, we think it’s cool to let people review your work, so give this a try on your portfolio.

NextGen Gallery

Probably the most comprehensive image gallery plugin for Wordpress, NextGen Gallery provides a huge set of options for displaying your images. From adding custom templates and multiple CSS stylesheets, to using watermarks and slideshows, it’s the only plugin you need for an instant, professional-looking gallery.

FlippingBook

Some people love them and some people hate them, but page-flip sites stand out from the crowd. If you want your portfolio in picture-book format, FlippingBook is the plugin for you. It lets you easily create an interactive Flash album complete with pages that, well, flip!

Smush.it

This neat little plugin is a FrogsThemes favourite, optimising your images in a ‘lossless’ way. As any web designer knows, saving bytes is a good thing. Your portfolio loads faster and there’s less stress on your bandwidth. Smush.it makes it easy for everyone to optimise their image file sizes – once installed, it optimises new images automagically!

Wordpress Super Cache

This plugin also cuts down on your page load time by generating a static HTML file to serve to most of your users. It’s a lot quicker than serving normal Wordpress php scripts and a really useful talent for image-heavy sites like your portfolio. If your work is popular on social media sites, Wordpress Super Cache can help your site handle the resulting heavy traffic. Neat huh?

Audio Player 2.0

Want to add audio to your portfolio? Look no further than Audio Player 2.0. From autostart to autoloop, it has everything you need to make your portfolio literally speak to your visitors. The top advantage for portfolio sites? You can customise the colour scheme to blend in with your design.

Wordpress Backup

Now you’ve installed all these plugins and your portfolio is ace, it’s time to make it safe and secure. Currently, the best plugin that backs up your Wordpress portfolio is simply called Wordpress Backup. It performs regular backups of your upload directory (i.e. images), your theme and your plugin directory. This takes care of a lot of your content, but unfortunately leaves out your database.

For that we recommend a newcomer – Online Backup for Wordpress. This plugin comes with 50MiB of free space in a real life datacentre – your blog posts have never been so secure! We’ve been assured that in the coming months this plugin will backup images, plugins and other file-level items, so watch this space for an update.

Windows Firewall and non-secure FTP traffic Rule for firewall

Windows firewall can be configured from command line using netsh command. 2 simple steps are required to setup Windows Firewall to allow non-secure FTP traffic

1) Open port 21 on the firewall

netsh advfirewall firewall add rule name=”FTP (no SSL)” action=allow protocol=TCP dir=in localport=21

2) Activate firewall application filter for FTP (aka Stateful FTP) that will dynamically open ports for data connections

netsh advfirewall set global StatefulFtp enable

Hope this information is helpful for you….

How Do I Enable remote access to PostgreSQL database server?

By default, PostgreSQL database server remote access disabled for security reasons. However, some time you need to provide the remote access to database server from home computer or from web server.

Step # 1: Login over ssh if server is outside your IDC

Login over ssh to remote PostgreSQL database server:

$ ssh user@remote.pgsql.server.com

Step # 2: Enable client authentication

Once connected, you need edit the PostgreSQL configuration file, edit the PostgreSQL configuration file /var/lib/pgsql/data/pg_hba.conf (or /etc/postgresql/8.2/main/pg_hba.conf for latest 8.2 version) using a text editor such as vi.

Login as postgres user using su / sudo command, enter:

$ su - postgres

Edit the file:

$ vi /var/lib/pgsql/data/pg_hba.conf

OR

$ vi /etc/postgresql/8.2/main/pg_hba.conf

Append the following configuration lines to give access to 10.10.29.0/24 network:

host all all 10.10.29.0/24 trust

Save and close the file. Make sure you replace 10.10.29.0/24 with actual network IP address range of the clients system in your own network.

Step # 2: Enable networking for PostgreSQL

You need to enable TCP / IP networking. Use either step #3 or #3a as per your PostgreSQL database server version.

Step # 3: Allow TCP/IP socket

If you are using PostgreSQL version 8.x or newer use the following instructions or skip to Step # 3a for older version (7.x or older).

You need to open PostgreSQL configuration file /var/lib/pgsql/data/postgresql.conf or /etc/postgresql/8.2/main/postgresql.conf.

# vi /etc/postgresql/8.2/main/postgresql.conf

OR

# vi /var/lib/pgsql/data/postgresql.conf

Find configuration line that read as follows:

listen_addresses='localhost'

Next set IP address(es) to listen on; you can use comma-separated list of addresses; defaults to ‘localhost’, and ‘*’ is all ip address:

listen_addresses='*'

Or just bind to 202.54.1.2 and 202.54.1.3 IP address

listen_addresses='202.54.1.2 202.54.1.3'

Save and close the file. Skip to step # 4.

Step #3a – Information for old version 7.x or older

Following configuration only required for PostgreSQL version 7.x or older. Open config file, enter:

# vi /var/lib/pgsql/data/postgresql.conf

Bind and open TCP/IP port by setting tcpip_socket to true. Set / modify tcpip_socket to true:

tcpip_socket = true

Save and close the file.

Step # 4: Restart PostgreSQL Server

Type the following command:

# /etc/init.d/postgresql restart

Step # 5: Iptables firewall rules

Make sure iptables is not blocking communication, open port 5432 (append rules to your iptables scripts or file /etc/sysconfig/iptables):

iptables -A INPUT -p tcp -s 0/0 --sport 1024:65535 -d 20.04.23.22  --dport 5432 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp -s 20.04.23.22 --sport 5432 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT

Restart firewall:

# /etc/init.d/iptables restart

Step # 6: Test your setup

Use psql command from client system. Connect to remote server using IP address 20.04.23.22 and login using postgres username and testdatabase database, enter:

$ psql -h 20.04.23.22 -U postgres -d testdatabase

Paginating multiple models using will_paginate on the same page

The will_paginate plugin makes pagination for your models in Ruby on Rails ridiculously simple. However sometimes you’ll find yourself wanting to paginate over two or more models on a single page. For instance, you might want to display a list of users and administrators on a single page along with a pager for each model (assuming that users and administrators are stored in separate tables).

Controller code

The code is pretty simple, except that I am specifying the page to show to be equal to params[:user_page] and params[:administrator_page] respectively. Since we are allowing the ability to page over two models, we need two separate parameters to determine which page of users or administrators to show.

@users = User.paginate(:page => params[:user_page], :per_page => 10)<br/>
@administrators = Administrator.paginate(:page => params[:administrator_page], :per_page => 10)

View code

In the view all we need to do is make sure to set the param_value to the correct value to indicate to the plugin that we want to use a different parameter name for the page. The default is simply called ‘page’, but we need to make sure to use ‘user_page’ and ‘administrator_page’ instead for the two different models.

<%= will_paginate @users, :param_name => 'user_page' %><br/>
<%= will_paginate @administrators, :param_name => 'administrator_page' %>

That’s it, you should now be able to page through your users and administrators on the same page.

Windows Phone 7 is Fail…

No file system access:
No file system access means

a) you can not use it as USB thumb drive
b) you can not share files with different computers
c) there is no file downloads from web and no useful ftp clients and similar apps because they are useless without fsa
d) you can not open files with different apps unless maybe you email them to yourself, which is complicated but is the common way to get files on iPhones and it will also be like that crap on WP7

No SD cards
I hope I don’t have to explain why that sucks. Terabyte SDXC cards are on the way and WP7 buyers are stuck with built in 8-32GB. And you have no thumb drive mode and no SD card to take out and load files on it.

No copy and paste
No, you are not dreaming to live in 2007. It really is 2010 and WP7 really has no copy&paste. Is this ridiculous or what?

No multitasking
People always talk crap like multitasking makes phones slow and makes battery life bad but really with a bit of thinking multitasking can be implemented in ways that do not have any bad effects at all and it even speeds things up because there is no loading times and of course push notifications also hurt battery life.

Plus there is lots of things that are not possible without multitasking. Say byebye to GPS tracking and stuff.

Marketplace censorship
They say it will be “objective” but everyone knows that is crap talk just look at current WM6.5 policies they are the same censorship as in Apple AppStore.

No native coding and no deep customization
Say byebye to apps that let you customize buttons or replace built in apps or let you adjust any advanced settings.
It is for sure that MS will not include all settings that users may need and there is no way users can change anything that is not in settings by default, because there is no file system or registry access for apps.

All the mentioned things make the user experience worse. Emailing everything to yourself sucks it’s complicated and it is also complicated to have quick looks at info inside apps without multitasking and much more problems because of the stupid limitations.

To me WP7 is a complete FAIL. It can not compete to anything except for iPhone. I totally hate Apple and iPhone but I hope they kill WP7 so that MS realize how they fucked up WP7.

I don’t know why but in US, iPhone is a lot more popular and there is no Symbian. There WP7 can fight against iPhone.

List of useful rake tasks for Rails…

rake cache:clear
# Clears all cached pages
rake db:bootstrap
# Loads a schema.rb file into the database and then loads the initial database fixtures.
rake db:bootstrap:copy_default_theme
# Copy default theme to site theme
rake db:migrate
# Migrate the database through scripts in db/migrate. Target specific version with VERSION=x
rake db:schema:dump
# Create a db/schema.rb file that can be portably used against any DB supported by AR
rake db:schema:load
# Load a schema.rb file into the database
rake db:bootstrap:load
# Load initial database fixtures (in db/bootstrap/*.yml) into the current environment's database.  Load specific fixtures using FIXTURES=x,y
rake db:fixtures:load
# Load fixtures into the current environment's database.  Load specific fixtures using FIXTURES=x,y
rake db:sessions:clear
# Clear the sessions table
rake db:sessions:create
# Creates a sessions table for use with CGI::Session::ActiveRecordStore
rake db:structure:dump
# Dump the database structure to a SQL file
rake db:test:clone
# Recreate the test database from the current environment's database schema
rake db:test:clone_structure
# Recreate the test databases from the development structure
rake db:test:prepare
# Prepare the test database and load the schema
rake db:test:purge
# Empty the test database
rake deploy
# Push the latest revision into production using the release manager
rake diff_from_last_deploy
# Describe the differences between HEAD and the last production release
rake doc:app
# Build the app HTML Files
rake doc:clobber_app
# Remove rdoc products
rake doc:clobber_plugins
# Remove plugin documentation
rake doc:clobber_rails
# Remove rdoc products
rake doc:plugins
# Generate documation for all installed plugins
rake doc:rails
# Build the rails HTML Files
rake doc:reapp
# Force a rebuild of the RDOC files
rake doc:rerails
# Force a rebuild of the RDOC files
rake edge
# freeze rails edge
rake log:clear
# Truncates all *.log files in log/ to zero bytes
rake rails:freeze:edge
# Lock to latest Edge Rails or a specific revision with REVISION=X (ex: REVISION=4021) or a tag with TAG=Y (ex: TAG=rel_1-1-0)
rake rails:freeze:gems
# Lock this application to the current gems (by unpacking them into vendor/rails)
rake rails:unfreeze
# Unlock this application from freeze of gems or edge and return to a fluid use of system gems
rake rails:update
# Update both configs, scripts and public/javascripts from Rails
rake rails:update:configs
# Update config/boot.rb from your current rails install
rake rails:update:javascripts
# Update your javascripts from your current rails install
rake rails:update:scripts
# Add new scripts to the application script/ directory
rake remote_exec
# Execute a specific action using the release manager
rake rollback
# Rollback to the release before the current release in production
rake show_deploy_tasks
# Enumerate all available deployment tasks
rake stats
# Report code statistics (KLOCs, etc) from the application
rake test
# Test all units and functionals
rake test:functionals                 
# Run tests for functionalsdb:test:prepare
rake test:integration
# Run tests for integrationdb:test:prepare
rake test:plugins                     
# Run tests for pluginsenvironment
rake test:recent
# Run tests for recentdb:test:prepare
rake test:uncommitted                 
# Run tests for uncommitteddb:test:prepare
rake test:units
# Run tests for unitsdb:test:prepare
rake tmp:cache:clear
# Clears all files and directories in tmp/cache
rake tmp:clear                        
# Clear session, cache, and socket files from tmp/
rake tmp:create                       
# Creates tmp directories for sessions, cache, and sockets
rake tmp:pids:clear                   
# Clears all files in tmp/pids
rake tmp:sessions:clear               
# Clears all files in tmp/sessions
rake tmp:sockets:clear
# Clears all files in tmp/sockets
rake update_dialog_helper
# Copies the latest dialog.js to the application's public directory