Setting up a Java run configuration in Intellij for existing dropwizard project

1) Hit the drop down next to the run buttons, and click edit configuration
2) here press the “add” button symbol (top left for pop over)
3) Select Application
4) Set your working directory of your application
5) Set the classpath of the module you want to run is applicable from drop down
6) Select Main class by clicking the “…” button and using the modal
7) Add any VM options, I used -Ddw.http.port=9090 to get Jetty to run on this port
8) Add any arguments your application is expecting, Mine was expecting a config file so I used “server Config.yml”

Setting up Ruby on Rails under Cygwin on Windows 8

I thought I would note down my first experiences of trying to set up Cygwin and Ruby on Rails on my windows machine, the following is what worked for me.

1) Download Cygwin from http://www.cygwin.com/
2) When setting up make sure that the following packages are selected, also include and dependencies that Cygwin suggests

  • Ruby
  • SQLite3
  • Libsqllite
  • odbc-sqlite3
  • Git
  • GCC
  • Make
  • Nano
  • Curl
  • Wget

3) once this has installed, confirm ruby is working in cygwin by running Ruby -v
4) Once this is done go download the latest rubygems from http://rubyforge.org/frs/?group_id=126
5) in Cygwin un-tar this file (eg: tar -xf rubygems-1.8.25.tgz)
6) go into the new rubygems directory and run Ruby setup.rb install, this should install rubygems
7) confirm ruby gem is installed correctly by running gem --version
8) then time to install rails, in cygwin run gem install rails, confirm that this has worked by running rails -v
9) Now create your ruby project by running Rails new [app_name], in the Directory you so wish.
10) one this is done run the server by running Rails server. make sure you can browse to 127.0.0.1:3000 once the server is started up.

Sublime Text 2 ColdFusion key bindings / keyboard shortcuts

In Sublime Text 2 go to Prefs > key Bindings – user.

And add these rules in there:
[
// Custom Bindings
{ "keys": ["ctrl+shift+x"], "command": "upper_case" },
{ "keys": ["ctrl+shift+y"], "command": "lower_case" },
// START COLDFUSION KEY-BINDINGS
// cfabort
{ "keys": ["ctrl+shift+a"], "command": "insert_snippet", "args": {"contents": "<cfabort>" } },
// cfdump
{ "keys": ["ctrl+shift+d"], "command": "insert_snippet", "args": {"contents": "<cfdump var="#${0:$SELECTION}#">" } },
// cfoutput
{ "keys": ["ctrl+shift+o"], "command": "insert_snippet", "args": {"contents": "<cfoutput>${0:$SELECTION}</cfoutput>" } },
// super dump
{ "keys": ["ctrl+alt+shift+d"], "command": "insert_snippet", "args": {"contents": "<cfoutput><cfdump var="#${0:$SELECTION}#"></cfoutput><cfabort>" } },

// wrappers
// hash
{ "keys": ["ctrl+shift+h"], "command": "insert_snippet", "args": {"contents": "#${0:$SELECTION}#" } },
// single line comment
{ "keys": ["ctrl+shift+m"], "command": "insert_snippet", "args": {"contents": "<!--- ${0:$SELECTION} --->" }, "context":
[
{ "key": "text", "operator": "not_regex_contains", "operand": "n" }
]
},
// multi line comment
{ "keys": ["ctrl+shift+m"], "command": "insert_snippet", "args": {"contents": "<!--- n${0:$SELECTION} --->n" }, "context":
[
{ "key": "text", "operator": "regex_contains", "operand": "n" }
]
},
// END COLDFUSION KEY-BINDINGS

// remap sublime text defaults
{ "keys": ["ctrl+alt+d"], "command": "duplicate_line" },
{ "keys": ["ctrl+alt+m"], "command": "expand_selection", "args": {"to": "brackets"} },
{ "keys": ["ctrl+shift+c"], "command": "expand_selection", "args": {"to": "tag"} }
]

MXUnit for Coldfusion Upgrade from 1.x.x to 2.x.x

So I have just upgraded MXUnit at work to the latest and greatest version (2.0.2).

Everything seems to have gone well apart from a couple of things.

Firstly dumps and output in the tests no longer appear in the output section of my tests, I have to use the debug() function and this seems to have the desired effect. Be aware that you also need to have “debug=true” in the URL for this to work.

It would seem that even though the docs suggest the now deprecated EXTJS results view is still supported, this does not seem to be the case.

Of course the above may all be down to my inability to thoroughly read the documentation, however I thought I would share this for the other impatient folk out there!

Trace event for a component in flex.

Just a quick snippet that is handy to use to see what events you can hook into.

override public function dispatchEvent(event:Event):Boolean
{
trace(“type ” + event.type + ” Phase: ” + event.eventPhase);
return super.dispatchEvent(event);
}