Skip to content

Instantly share code, notes, and snippets.

View vagmi's full-sized avatar

Vagmi Mudumbai vagmi

View GitHub Profile
@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 / pg_application_name_patch.rb
Created May 11, 2012 06:13
Set the application name for a postgres connection in Rails 3
module ActiveRecord
module ApplicationName
def self.included(base)
unless base.respond_to? :establish_connection_with_application_name
base.extend ClassMethods
base.class_eval do
class << self
alias_method_chain :establish_connection, :application_name
end
end
@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 / init.el
Created December 25, 2012 06:28
All you need to get a minimal clojure development environment up and running on a brand new emacs (brew install emacs --cocoa)
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
(unless (require 'el-get nil 'noerror)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.github.com/dimitri/el-get/master/el-get-install.el")
(let (el-get-master-branch)
(goto-char (point-max))
(eval-print-last-sexp))))
section
h1 HackerDeck
p Vagmi Mudumbai
h2= ENV.inspect
section
h2 Hacker friendly workflow for presentations
markdown:
The code looks a bit like this.
@vagmi
vagmi / slides.slim
Last active December 11, 2015 09:08
section
h1 An awesome presentation
p Vagmi Mudumbai
section
section
h1 With cool transitions
section
p And nested slides
section
p show me the code
@vagmi
vagmi / nearest_leap.rb
Created February 28, 2013 17:01
A lot of people were sending me emails about Friday the 29th of February. What they forget is that 2013 is not a leap year. The nearest leap year where Feb 29th is a friday is 2036. If you do not believe me, you can run the script your self.
require 'date'
year=2012
until(DateTime.parse("#{year}-02-29").strftime("%a")=="Fri")
year=year+4
end
puts year

A developer's guide to working remotely

Working from home is hard. It takes some practice to get it right. If somebody said that working from home is all about relaxed schedules, coding in your pajamas and working on your own time, they are not being entirely honest. The pajamas bit is true. The truth is that if you need to work efficiently, you need to have a discipline much like working in an office. But you are making a choice to let the work speak for yourself rather than your physical presence in the office.

Communication

The first thing you need to keep in mind is that it is vitally important to keep the communication channels open. As a team member working from home, the onus is on you to communicate with the team. Also the team should include remote members into meetings and discussions. This means that you would have to keep asynchronous modes of communication like a IRC/Campfire/Hipchat open. Do not be reluctant to get into a call and discuss things when required. If there is a timezone dif