Skip to content

Instantly share code, notes, and snippets.

  1. North Indian thali (a plate with all different dishes on the sides)
  2. Butter naan with Alu gobi (indian bread with curry)
  3. Idli vada sambar (must try! it's south indian special - google it if you like)
  4. also, try the "Phulka" instead of the roti (if you order roti/naan). Its quite unique and good

Dosas: (also south indian special!)

  1. Masala dosa (or cheese masala dosa)
  2. paper cheese dosa (long dosa)
  3. ghee roast dosa (pyramid shaped dosa)
@madhums
madhums / pancakes.md
Created March 16, 2016 22:01
pancake recepie

For 4 servings:

  • 125g floor
  • 250ml milk
  • 1-2 eggs

For 8-10 servings

  • 250g floor
  • 500ml milk
@madhums
madhums / nodejs-install-update.sh
Last active October 1, 2017 10:25
Script to install update node.js
#!/bin/sh
# Usage:
# curl https://gist.githubusercontent.com/madhums/3791075/raw/38675884dfb7e3acd5672092807da54509748266/nodejs-install-update.sh | sh -s 0.8.10
# This script will simply install/update node.js to the version you specify.
# It will be installed/updated to $HOME/local/node
NODEJS=$1
@madhums
madhums / AngularJS-ES6-Test-Skeleton
Last active June 30, 2017 19:37 — forked from busypeoples/AngularJS-ES6-Test-Skeleton
AngularJS - Karma, Jasmine, Browserify, Stringify - ES6 Test Setup
We couldn’t find that file to show.
//- app/views/forgot-password.jade
extends ../layouts/default
block heading
h2.center= title
block content
br
form.form-horizontal.col-md-5.col-md-offset-4(action="/users/forgot-password", method="post", role="form")
@madhums
madhums / Procfile.development
Created August 22, 2011 07:15
foreman and thinking sphinx
sphinx: bundle exec rake thinking_sphinx:run_in_foreground RAILS_ENV=development --trace
@madhums
madhums / flatten.js
Created January 20, 2014 20:28
flatten an array containing prev, next nested objects
function (obj, arr) {
var index = arr.push(obj);
if (obj.prev) {
arr.splice.apply(arr, [index - arr.length, 0].concat(this.timeline(obj.prev, [])));
}
if (obj.next) {
arr.splice.apply(arr, [index + arr.length, 0].concat(this.timeline(obj.next, [])));
}
return arr;
}
@madhums
madhums / authlogic-configuration.rb
Created November 15, 2010 12:33
authlogic configuration : If you want to have password and password confirmation required on signup form AND optional (i.e, leave it blank) in profile update, this is the configuration
class User < ActiveRecord::Base
attr_accessor :password_confirmation
acts_as_authentic do |c|
c.validates_length_of_login_field_options :within=>1..30 #username can be 1 to 30 characters long
c.validates_format_of_login_field_options = {:with => /^[a-zA-Z0-9_]+$/, :message => I18n.t('error_messages.login_invalid', :default => "should use only alphabets, numbers and underscores no other characters.")} #username can only contain alphabets, numbers and "_" no other characters permitted
#the below two would make password and password_confirmation optional i.e, you don't have to fill it.
c.ignore_blank_passwords = true #ignoring passwords
c.validate_password_field = false #ignoring validations for password fields
end
var layers = [
{
image: 'image 1',
x1: 0,
y1: 0,
x2: 100,
y2: 100
},
{