The 26 grunt plugins we use at qrator.com

There has recently been renowned interest in javascript build tools and task runners, with grunt.js being the most popular one and gulp and brocolli the new kids in town!

At qrator.com, we have been using grunt to manage the worklflow for our emberjs application. Our Gruntfile.js was originally created with the yeoman emberjs generator but has since grown to 633 lines of code. We are now using many grunt plugins for the several different aspects of the app and here’s a list of the most important ones:

  • matchdep: This contains helpers to filter the dependecies of a project. It enables loading all other grunt plugins with the following line of code require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks)

  • grunt-contrib-connect: Starts a connect web server. This just serves our app.

  • grunt-contrib-livereload: Reloads browser when changes occur in the source files (js, html, css).

  • grunt-open: This just open urls and files – it’s used to start the browser with our app.

  • grunt-contrib-jshint: Lints js code. We’ve set this up to be triggered as a pre-commit hook.

  • grunt-jsbeautifier: Helps with beautifying and keeping a consistent syntax in your javascript files. We’ve also set this up to be triggered as a pre-commit hook.

  • grunt-mocha: Runs our client-side mocha specs.

  • grunt-contrib-coffee: Compiles coffeescript files.

  • grunt-contrib-compass: Compiles sass files using the compass ruby project. Latest versions can generate sourcemaps which are quite handy while developing.

  • connect-url-rewrite: Rewrites urls. This is useful in our case for making css/js sourcemaps work.

  • grunt-preprocess: Preprocesses files using a syntax based on conditional comments. We use this to generate different versions for testing, development and deployment of our index.html file.

  • grunt-rev: Does static file asset revisioning through content hashing. We use this plugin for versioning our final js and css files and are planning to use it for images.

  • grunt-usemin and grunt-useminPrepare: Used in conjuction with grunt-rev, this plugin replaces references to non-optimized scripts or stylesheets (or any file) into a set of HTML files (or any templates/views).

  • grunt-contrib-imagemin: Compresses images without affecting their quality.

  • grunt-contrib-cssmin: Compresses css.

  • grunt-contrib-uglify: Compresses js.

  • grunt-concurrent: Runs tasks concurrently.

  • grunt-ember-templates: Precompiles Handlebars templates for Ember.js.

  • grunt-neuter: Concatenates files in the order they are required. This is used to break up the application in multiple folders and js files. Ideally this will eventually be replaced by a pure js solution like require.js or converting to ES6 modules and using the grunt-es6-module-transpiler.

  • grunt-ssh: This is used to sftp the packaged app to production or staging servers.

  • grunt-contrib-compress: Compresses files and folders. Useful for email delivery.

  • grunt-shell: Runs shell commands. This is used to integrate several useful shell scripts into the grunt workflow.

  • grunt-conventional-changelog: Generates a changelog using git metadata. Useful to know what has changed between releases.

  • grunt-bump: Bumps package version (in package.json), creating the appropriate tags and optionally commiting/pushing the changes. We use it in conjuction with grunt-conventional-changelog.

  • grunt-phantomas: A phantomJS-based web performance metrics collector and monitoring tool. Useful to see how your app performs in several different key metrics.

  • There’s an internal plugin that allows local overrides to the Gruntfile.js. This is useful in order to disable specific behavior in certain environments (for instance, image minification is not totally reliable in windows environments, and same goes for compass’s sourcemaps). One can achieve something similar with grunt-local-settings.

And as a final piece of emberjs related advice, if you’re currently bootstraping your emberjs application, it’s best to forgo yeoman (i don’t believe the ember generator is maintained any more) and use Ember App Kit. Additionally, if you’re going to bootstrap in a few weeks, you should definitely check out Ember CLI

Charles Proxy for iOS development – simulating 3g

Charles Proxy is a great tool for web developers and it can help you in mobile apps too.

Here’s what you’d need to set it up:

  1. Run charles on your pc / mac, go to Proxy -> Proxy Settings and note the proxy port
  2. In your device network settings, enable http proxy and enter its ip and port (see below for ios)
  3.  Back to charles, click on Proxy -> Throttling Settings and enable throttling while choosing the 3G Throttle Preset. In the example below i’ve created another preset where i’ve lowered the in/out bandwidth even further

That’s it – now go use your app and watch in the charles screen the requests.

For extra credits, you can introduce packet loss/reordering by running

tc qdisc change dev eth0 root netem delay 10ms reorder 25% 50%

in your box – see netem for more

Streaming Schedule of ApacheCon Hadoop, HTTP Server, and Lucene Track

Streaming Schedule of ApacheCon Hadoop, HTTP Server, and Lucene Track
Starting in less than 24 hours and for the next 4 days there’s ApacheCon. Don’t miss the live streaming from http://streaming.linux-magazin.de/en/program-apachecon-us-2009.htm . Here’s the schedule (times in UTC):

Wednesday, 04 November 2009: Hadoop Track
  17:00 Opening Plenary & State of the Feather
       William A. Rowe, Jr. & Jim Jagielski
 
  17:30 Apache Pioneer's Panel
       Moderated by Brian Behlendorf
 
  19:00 Introduction to Apache Hadoop
       Owen O'Malley
 
  19:30 2009 State of the Elephant
       Christophe Bisciglia
 
  21:30 Becoming a Pig Developer
       Alan Gates
 
  22:30 Apache Hadoop in the Cloud
       Tom White
 
  00:00 Practical HBase
       Michael Stack
 
  01:00 Apache Hive: SQL and Data warehousing on Apache Hadoop
       Ashish Thusoo
 
Thursday, 05 November 2009: HTTP Track

  17:00 Munging URLs with mod_rewrite
       Rich Bowen
 
  18:00 Hardening Enterprise Apache Installations Against Attacks
       Sander Temme
 
  19:30 Keynote: Standing Out in the Crowd
       Kirrily Robert
 
  22:00 Scalable Internet Architectures
       Theo Schlossnagle
 
  00:30 Recent Developments in SSL and Browsers
       Rick Andrews
 
  01:30 Lightning Talks!
 
Friday, 06 November 2009: Lucene Track

  17:00 Implementing an Information Retrieval Framework for an
       Organizational Repository, Sithu D Sudarsan
 
  18:00 Apache Mahout - Going from raw data to information
       Isabel Drost
 
  19:15 MIME Magic with Apache Tika
       Jukka Zitting
 
  20:15 Keynote: How Open Source Developers Can (Still!) Save The World
       Brian Behlendorf
 
  22:00 Building Intelligent Search Applications with the Lucene
       Ecosystem, Ted Dunning
 
  23:00 Realtime Search
       Jason Rutherglen
 

So, Apache friends, enjoy!

On LG FLATRON L1915S problems

On LG FLATRON L1915S problems

I’ve had this monitor for 1.5~2 years – no complaints so far.

But as I woke up this morning, it wouldn’t turn on. To be more exact, it would initially show the computer’s contents, then after half a second, it would simply go black… It’s neither a cable issue, nor a graphic card issue and what’s weird is that its operation light is turned on (green) as if everything works!

Fixya.com has some details on the monitor, and interestingly those two guys report the same issue. From the comments there, it looks like this is an issue of the inverter board and the Cold Compact Fluorescent bulbs and it’s supposed to be fixable though there’s no mention at the cost.

Anyway, i’ll try to get it fixed, nut i’ll probably go on to a new and bigger display, perhaps in the 21′-25′ range… Any suggestions?

About Samsung LE32T51BX

About Samsung LE32T51BX

I’m thinking of buying this TV, but I cannot find anywhere on the net if it
supports PIP (Picture in Picture).

So, I’m writing this in the hope that someone can help me…