sudo aptitude install -y imagemagick
sudo aptitude install -y libmagick9-dev
sudo gem install rmagick
Collection of notes on common problems and issues I faced while doing day to day programming
Tuesday, September 15, 2009
Install RMagick on Ubuntu
Bind a key binding that is already defined
To correctly bind a key that is already defined for example by platform - F5 for refresh, the important thing is to create your own context:
Once correct context is defined, it needs to be activated. For example, in view:
Then the usual, command is created that is tied to a handler that extends AbstractHandler, command is tied to a binding, and the binding is in turn uses earlier created custom context.
name="refresh" parentId="org.eclipse.ui.contexts.window">
Once correct context is defined, it needs to be activated. For example, in view:
View.createPartControl(Composite parent) {
...
...
IContextService contextService = (IContextService) getSite().getService(IContextService.class);
contextService.activateContext("com.iwaysoftware.explorer.refresh");
}
Then the usual, command is created that is tied to a handler that extends AbstractHandler, command is tied to a binding, and the binding is in turn uses earlier created custom context.
defaultHandler="com.iwaysoftware.explorer.handler.RefreshHandler" id="com.iwaysoftware.explorer.refreshCommand"
name="Refresh">
sequence="F5" schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
contextId="com.iwaysoftware.explorer.refresh" />
name="refresh" parentId="org.eclipse.ui.contexts.window">
Saturday, September 12, 2009
Kill process that is using paricular port
Find process id and kill it
ruby@t61:~/dev/ruby/demo$ sudo netstat -lpn | grep 3000
[sudo] password for ruby:
tcp 0 0 127.0.0.1:3000 0.0.0.0:* LISTEN 5358/ruby
ruby@t61:~/dev/ruby/demo$ kill -9 5358
Subscribe to:
Posts (Atom)