Skip to content

Instantly share code, notes, and snippets.

View vagmi's full-sized avatar

Vagmi Mudumbai vagmi

View GitHub Profile
@vagmi
vagmi / update_bundles.rb
Created October 21, 2010 07:53
The glorious pathogen file
#!/usr/bin/env ruby
git_bundles = [
"git://github.com/astashov/vim-ruby-debugger.git",
"git://github.com/msanders/snipmate.vim.git",
"git://github.com/scrooloose/nerdtree.git",
"git://github.com/timcharper/textile.vim.git",
"git://github.com/tpope/vim-cucumber.git",
"git://github.com/tpope/vim-fugitive.git",
"git://github.com/tpope/vim-git.git",
Site Manager
- Rabbit MQ Queue
Agent(s):
Its a long running service
- JRuby
- H2 via ActiveRecord 3.0
Models
- Patient
- Test Results
@vagmi
vagmi / Queries
Created December 27, 2010 09:35 — forked from healthhiway/Queries
1) For a given UHID, I want the details in the Patient model as above
2) For a given UHID, I want a list of Textual and Numeric Results (Profiles and Special are also a part of the texual result)
3) For a given UHID, I want a list of Textual and Numeric Results, since a given Result Date
4) For a given UHID, get a list of encounters
5) For a given UHID, get a list of encounters since a given date
6) For a given encounter id, get a list of procedures
7) For a given encounter id, get the discharge summary
8) For a given Doctor ID, get me a the details in the doctor model.
#!/usr/bin/env ruby
git_bundles = [
"git://github.com/astashov/vim-ruby-debugger.git",
"git://github.com/msanders/snipmate.vim.git",
"git://github.com/scrooloose/nerdtree.git",
"git://github.com/timcharper/textile.vim.git",
"git://github.com/tpope/vim-cucumber.git",
"git://github.com/tpope/vim-fugitive.git",
"git://github.com/tpope/vim-git.git",
@vagmi
vagmi / gist:936206
Created April 22, 2011 07:21 — forked from accuser/gist:522944
custom 404 error page
# app/controllers/application_controller.rb
class ApplicationController < ActionController::Base
rescue_from(ActionController::RoutingError) {
render :template => 'errors/404'
}
end
# config/initializers/show_exceptions.rb
require 'action_dispatch/middleware/show_exceptions'
function! RTFHighlight(line1,line2,...)
if !executable('highlight')
echoerr "Bummer! highlight not found. Get it from http://www.andre-simon.de/doku/highlight/en/highlight.html"
return
endif
let content = join(getline(a:line1,a:line2),"\n")
let command = "highlight --syntax " . a:1 . " -s bipolar -R -k Menlo -K 24 2> /dev/null"
let output = system(command,content)
" let @* = output
@vagmi
vagmi / update_vim_bundles.rb
Created June 23, 2011 13:08
put it in ~/.vim/
#!/usr/bin/env ruby
git_bundles = [
"git://github.com/astashov/vim-ruby-debugger.git",
"git://github.com/msanders/snipmate.vim.git",
"git://github.com/scrooloose/nerdtree.git",
"git://github.com/timcharper/textile.vim.git",
"git://github.com/tpope/vim-cucumber.git",
"git://github.com/tpope/vim-fugitive.git",
"git://github.com/tpope/vim-git.git",
@vagmi
vagmi / .vimrc
Created June 23, 2011 13:12
put it in ~
filetype plugin on
"filetype off
call pathogen#helptags()
call pathogen#runtime_append_all_bundles()
set vb
set autoindent
set smarttab
set expandtab
set tabstop=2
@vagmi
vagmi / gist:1050853
Created June 28, 2011 10:18
email configuration options
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
  :address              => "smtp.gmail.com",
  :port                 => 587,
  :domain               => 'gmail.com',
  :user_name            => 'collabnetrp',
  :authentication       => 'plain',
  :enable_starttls_auto => true  }
@vagmi
vagmi / HelloDartTest.dart
Created October 12, 2011 08:24
Dart Compilation
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// Simple test program invoked with an option to eagerly
// compile all code that is loaded in the isolate.
// VMOptions=--compile_all
class HelloDartTest {
static testMain() {
print("Hello, Darter!");