Git Open All Files With Merge Conflicts

git diff --name-only | uniq | xargs subl

I found it useful to create an alias too:

git config --global \
'!sh -c "git diff --name-only | uniq | xargs subl"'

And of course you can substitute subl for your favorite editor.

Check The Exit Status

Usually when you run a command you get an exit status of 0. So instead of checking the result of a command with a regex you can check the exit status.

`ping -q -c #{ping_count} #{server}`
if $?.exitstatus == 0
    # do something

Rails Rake Db Tasks

I accidentally stumbled upon this create StackOverflow answer by moritz. It gives a really detailed overview of what the rake database tasks do in rails.

  • db:create creates the database for the current env
  • db:create:all creates the databases for all envs
  • db:drop drops the database for the current env
  • db:drop:all drops the databases for all envs
  • db:migrate runs migrations for the current env that have not run yet
  • db:migrate:up runs one specific migration
  • db:migrate:down rolls back one specific migration
  • db:migrate:status shows current migration status
  • db:migrate:rollback rolls back the last migration
  • db:forward advances the current schema version to the next one
  • db:seed (only) runs the db/seed.rb file
  • db:schema:load loads the schema into the current env’s database
  • db:schema:dump dumps the current env’s schema (and seems to create the db aswell)
  • db:setup runs db:schema:load, db:seed
  • db:reset runs db:drop db:setup
  • db:migrate:redo runs (db:migrate:down db:migrate:up) or (db:migrate:rollback db:migrate:migrate) depending on the specified migration
  • db:migrate:reset runs db:drop db:create db:migrate

The Importance Of Metrics

Recently we decided to refine our metrics. This included removing vanity metrics from our dashboard and focusing attention on metrics that made a direct impact on our current goals.

Why are metrics important

To say that metrics are important is an understatement at best. In fact, I like to refer to metrics as the eyes of your company. Without them, you really are blind. ​ Being able to analyse your metrics based on what you do is invaluable information that can help shape a company or provide valuable feedback. For example, say we decided to try out a new strategy to increase our monthly usage; using our metrics dashboard we have real-time feedback on how effective the strategy is.

What does it all mean

While I was working on our metrics dashboard, I understood the importance of tracking our metrics and why we were doing it from a business perspective, but I also realized that these numbers reflect our impact on peoples lives. When someone moves down the funnel and into a user, there is realization of what that means. It means that another health professional is using something we made to provide better care to their patients. It feels good watching (via a slick dashboard) our product make an impact.

⤧  Previous page ⤧  Next page