Archive for tools

Script to say Alpha, Bravo, Charlie, Delta…

I just cannot remember the NATO phonetic alphabet especially when I had to spell out the software activation key to customers on phone. Anyway, to help me I have this script when on click would reveal the alphabets.

The NATO phonetic alphabet javascript is available on github. Feel free to do whatever you want to do with it.

Comments (1)

Using the older Rake (0.7.3)

You have updated rake to the newer version and only to find out that it does not work with older Rails tasks.

Certainly the rake 0.8.3 is not compatible with the Rails 1.2.3. If you try rake db:migrate, it fails with error: undefined method `last' for {:prepare=>:environment}:Hash.

To invoke the older rake use rake _0.7.3_ db:migrate. Obviously rake version 0.7.3 must be installed.

Older rake on remote

To invoke older rake in the remote server on your capistrano task, such as cap deploy:migrate, set which rake to use in the deploy.rb using set :rake, "rake _0.7.3_".

Comments

Juggernaut Rails Rake Tasks & Capistrano Tasks

Manage juggernaut push server process via rake using juggernaut rake tasks and juggernaut capistrano tasks.

Comments

AppleScript Tools and the GUI

Some applications do not expose API (Dictionary?) and you have no choice than to script-mimic the GUI events. AppleScipt on its own reminds me of COBOL (exaggerated) and scripting GUI is not proving to be easy either. The UIElementInspector, an easy to use app proves to be handly. It gives the full hierarchy of an UI element. You would really appreciate it when your code seems fine but is unable to find the menu item that looks like “Export Image…”, people expect it to be an ellipsis but no they are three periods.

AppleScript tools

Anyway, I am a beginner of AppleScript and I found these tools quite useful:

  • Editor: AppleScript Editor sucks, TextMate wins.
  • Dictionary: To view the exposed APIs appscript tools’ ASDictionary comes handy, which does a decent job of listing all the Objects and Methods in HTML can also show them in Ruby, Python, AppleScript and ObjectiveC terminologies.
  • Language Translator If you appreciated Ruby instead of AppleScript or Python or Objective C for that matter, using ASTranslator may help. Very handy when your google search returned snippets of AppleScript and you are scripting in Ruby.
  • GUI Elements: Of course the above mentioned UIElementInspector when you have no idea what is the hierarchy of a particular element.

Is there any other tool that I should know?

Comments

Useful ActiveSupport::Dependencies

It is quite handy to use rails’ auto-loading functionality on a non-rails ruby project. For e.g. if you want the classes in your lib folder to be auto-loaded, the following piece of code will help:

require 'active_support'
Dependencies.load_paths << "#{File.join(File.dirname(__FILE__), 'lib')}"

Say you have a file lib/answer.rb which defines class Answer; end;. This will be required when you first use Answer constant in your code.

Comments

Git repo failing on submodule in debian

Is your git repository that has at least one submodule fails to clone on your server?

You have a very good chance that the git version on the server wont support submodules. The debian package installer comes with the git 1.4.4, which does not support submodules.

You may have better luck to compile git on your own.

To compile git.. say version 1.5.5

wget http://kernel.org/pub/software/scm/git/git-1.5.5.tar.gz
tar xzf git-1.5.5.tar.gz
cd git-1.5.5
./configure
make
sudo make install

You may also want to make sure you have all dependencies

apt-get update
apt-get build-dep git-core

It may be possible that your make may fail because of missing tcl/tk, if that is the case, then:

apt-get install tcl8.4
apt-get install tk8.4

Comments (1)

Look at your PC from Mac

If you have a PC to connect to quickly while you are on Mac, try Remote Desktop Connection; it works quite well for a beta release.

Comments

Google App Engine

Google App Engine

Hightlights

  • Free
  • Scalable
  • Easy to deploy

!Hightlights

  • SQL less
  • Python so far
  • Cannot write files
  • external access limited to HTTP and HTTPS

Anyway, looks interesting, with scary code.

Comments

Project, Tasks & Time

Previously at work I used to do lots of Excel this, Excel that work. So I have a thing for Excel and I once built a time sheet for a friend of mine then. It was a simple and flexible task management excel sheet.Oh yea, a testimonial from the user:

Makes my life easy – It records times and dates automatically. Simple and stupid – Easy to use and Allows me to make changes to the auto recorded info. It helps me to fill in our weekly time sheet to say how much time I spent on a task

It is free to download Time log excel sheet & do whatever with it.

About Macros

I suggest you set Excel Macro settings to medium, so on opening the file, it would ask your permission to enable them.  The macro is in fact only there to help you with automatic time logging, add colours and install virus… am only joking.

Update: Download Time logger Excel Sheet from Github.

Comments