Strange Symphonies The whole is greater than the sum of its parts

31Jul/070

MyOSS Meetup August 2007

When
Thursday, August 2nd 7:30 PM

What - Meetup Agenda
7:30pm - 7:45pm Meet each other
7:45pm - 7:50pm Opening by the Organizer
8:00pm - 8:45pm Why FOSS for Small Business? By Khairil Yusof
8:45pm - 9:30pm Open Discussion

Benefits of Lower costs and risks
* no feature restrictions
* better use of old hardware
* license free upgrades
* vendor independence
* less increase in IT costs as your business grows

Overview of Software and Services
* Desktop
* Office Productivity
* Accounting, POS
* CRM
* Firewall/Internet Sharing
* Printer/File Sharing
* Email/Calendar
* Knowledge Management Systems
* Thin clients - Make use of older PCs

Licensing and Support
* How do these licenses affect me?
* What licenses are available?
* What rights do I have?
* Do I have to share everything?
* Am I liable? Who supports it?
* How/Where do I find support?

Target Audience
* Small businesses
* FOSS service providers

Cost:
Free. No registration required, just come right in, have a seat, and join the crowd.

Contact
aizat.faiz@gmail.com
017-690-8783

Where:
OUM Angkasa Raya
Open University Malaysia
Floor\Tingkat 3, Bangunan Angkasa Raya,
Jalan Ampang,
50450 Kuala Lumpur, Malaysia
TEL: 60-3-2148 8400

Located near Kuala Lumpur City Centre (KLCC)
15 minute walk from the KLCC LRT station.
Praying facilities are available on the campus.

About MyOSS Meetups

Interested in helping out the Free and Open Source Community in Malaysia?
Check out http://foss.org.my/projects/meetups/howto

If you would like to do a presentation, please contact me at the above email address.

Learn more about the MyOSS Meetups at http://foss.org.my/projects/meetups/about .

This meetup is possible due to the support and facilities provided by Open University Malaysia.

29Jul/070

haze.net.my July Updates

Several updates to haze.net.my (Malaysia Air Pollution Index):

  • Feeds now contain the previous 7 collected data
  • Feeds are now available for all Areas. So you can keep track of the past weeks air pollution for your Area. Want to know how Kuala Lumpur is doing?
  • Download indices as a Google Earth (kml) file
  • Replaced the Lowest and Highest linechart for Areas into Morning and Evening
  • Statistics about the amount of data collected, duration, and missing
  • Tables are now sortable

To do:

  • Improve Fullscreen Interface
  • Add heatmaps
  • Add deltas, to see difference from the past week. May use Sparklines
  • Include a nice/easy interface to change dates rapidly, via a JavaScript calendar
  • Pimp up the About page

More suggestions, comments, critique?

29Jul/071

Remove Firebug JavaScript Console Calls on Deployment

One thing I keep forgetting to do when deploying a Rails application is to remove any Firebug JavaScript console calls I use for debugging.

You know, those:

console.log("Please execute");
console.info("Warning " + collections.length + " Areas found")

Or something like that.

When committing back to the repository, you simply forget to remove them. Thus when deploying your new code, for those people who don't have Firebug installed, the script will end in a premature death.

Oh noes!

This definitely isn't cool, and its just a minor thing you forgot to do...and its causing a hell lot of problems.

Lucky for us we can hook into the Capistrano after update code callback to comment/strip out those lines from the JavaScript file.

To Comment Out:

task :after_update_code, :roles => :app do
  javascript_path = File.join(release_path, 'public', 'javascripts', '*.js')
  run "sed -i -r 's/(\\/\\/|^)(\\s*console\\.(log|info|debug|warn|error).*)/\\/\\/\\2/i' #{javascript_path}"
end

To Strip Out:

task :after_update_code, :roles => :app do
  javascript_path = File.join(release_path, 'public', 'javascripts', '*.js')
  run "sed -i -r 's/(\\/\\/|^)(\\s*console\\.(log|info|debug|warn|error).*)//i' #{javascript_path}"
end

So instead of removing those debugging calls from the file, just leave them there and let Capistrano and sed strip them out for ya!

Talk about an easy life :3.

Note: This only works in the top level javascripts directory.