Skip to content

Instantly share code, notes, and snippets.

View vagmi's full-sized avatar

Vagmi Mudumbai vagmi

View GitHub Profile
@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.
@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'
@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!");
@vagmi
vagmi / haproxy.cnf
Created December 11, 2011 13:38 — forked from asabirov/haproxy.cnf
Nginx, Faye, Node.js on 80 port
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
maxconn 4096
nbproc 1
pidfile /var/run/haproxy.pid
user haproxy
group haproxy
@vagmi
vagmi / server.rb
Created December 29, 2011 07:30 — forked from dhruvasagar/gist:1532564
Sinatra File Server for serving Videos & Images
$:.unshift File.expand_path("#{File.dirname(__FILE__)}")
APP_ROOT = File.expand_path(File.dirname(__FILE__))
puts APP_ROOT
require 'sinatra'
get '*' do
rpath=File.join(APP_ROOT,params[:splat][0][1..-1])
mimetype = `file -Ib #{rpath}`.gsub(/\n/,"")
puts "serving #{rpath} with mimetype #{mimetype}"
send_file rpath, :stream=>true, :type=>mimetype, :disposition=>:inline
@vagmi
vagmi / index.html
Created October 17, 2012 15:21 — forked from AgalyaLoganathan/index.html
d3 segment chart
<!doctype html>
<html>
<head>
<title>Segment Graph</title>
<style>
#segmentChart {
width: 400px;
height: 100px;
}
</style>
@vagmi
vagmi / index.html
Last active October 11, 2015 19:58 — forked from AgalyaLoganathan/index.html
d3 segment chart
<!doctype html>
<html>
<head>
<title>Segment Graph</title>
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/css/bootstrap-combined.min.css" rel="stylesheet">
<style>
#segmentChart {
float: left;
width: 400px;
height: 100px;
@vagmi
vagmi / oracle.md
Created April 9, 2013 04:28 — forked from dlokesh/oracle.md

Oracle sqls

find all constraints of a table

select * from all_constraints where table_name='TABLE_NAME' and owner='OWNER_NAME';

find all primary keys of a table

SELECT cols.table_name, cols.column_name, cols.position, cons.status, cons.owner
var lib = require("./manifest.js");
lib.mkmanifest({
filename : "cache"
,path : "../coffee"
,version : "02"
,exclude : ['/.DS_Store', '/.htaccess', '/cache.manifest']
/*
,network : ['/connect.php','/read.php']
,fallback : ['/offline.html']
@vagmi
vagmi / app.js
Created April 1, 2014 22:03 — forked from simme/app.js
// Load Ember into the global scope by requiring it
require('ember');
// Go have fun
var app = Ember.Application.create();