Skip to content

Instantly share code, notes, and snippets.

View anandpdoshi's full-sized avatar

Anand Doshi anandpdoshi

View GitHub Profile
@anandpdoshi
anandpdoshi / colorbrewer.js
Last active March 8, 2024 04:23
Relationships between DocTypes in ERPNext
// This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/).
var colorbrewer = {YlGn: {
3: ["#f7fcb9","#addd8e","#31a354"],
4: ["#ffffcc","#c2e699","#78c679","#238443"],
5: ["#ffffcc","#c2e699","#78c679","#31a354","#006837"],
6: ["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],
7: ["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],
8: ["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],
9: ["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]
},YlGnBu: {
@anandpdoshi
anandpdoshi / constituencies.json
Last active March 28, 2020 14:22
List of Constituencies of India by State (Reference: http://en.wikipedia.org/wiki/List_of_Constituencies_of_the_Lok_Sabha, Date: 2014-01-04, Sanitized, Format = {"State": {"Constituency": ["Assembly Segments"]}})
{
"Andaman and Nicobar Islands": {
"Andaman and Nicobar Islands": []
},
"Andhra Pradesh": {
"Adilabad": [
"Sirpur",
"Asifabad",
"Khanapur",
"Adilabad",
@anandpdoshi
anandpdoshi / index.html
Last active September 18, 2019 01:06
Interactive Sine Wave using PaperJS
<!DOCTYPE html>
<html>
<head>
<!-- Load the Paper.js library -->
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/paper.js/0.9.25/paper-full.min.js"></script>
<!-- Define inlined PaperScript associate it with myCanvas -->
<script type="text/paperscript" src="sine.js" data-paper-canvas="myCanvas"></script>
</head>
<body>
@anandpdoshi
anandpdoshi / impress.js
Last active February 6, 2017 15:36
ERPNext Open Day - June 2013 - by Anand Doshi
/**
* impress.js
*
* impress.js is a presentation tool based on the power of CSS3 transforms and transitions
* in modern browsers and inspired by the idea behind prezi.com.
*
*
* Copyright 2011-2012 Bartek Szopka (@bartaz)
*
* Released under the MIT and GPL Licenses.
startdev() {
mysql.server start
}
stopdev() {
mysql.server stop
}
# git
alias gs="git status -s"
@anandpdoshi
anandpdoshi / install_erpnext.py
Last active February 25, 2016 01:05
ERPNext Install script
#!/usr/bin/env python
from __future__ import unicode_literals
import os, sys
apache_user = None
is_redhat = is_debian = None
root_password = None
def install(install_path=None):
install_pre_requisites()
@anandpdoshi
anandpdoshi / monitor.py
Created February 24, 2016 07:41
Site monitoring using python multi-processing
import requests
from multiprocessing import Pool
import time
def monitor(server_sites):
start_time = time.time()
pool = Pool(processes=10)
results = []
for server, sites in server_sites.items():
@anandpdoshi
anandpdoshi / 2013_05.css
Last active December 18, 2015 00:29
ERPNext - Open Day - May 2013 - Anand Doshi
/*
html5doctor.com Reset Stylesheet
v1.6.1
Last Updated: 2010-09-17
Author: Richard Clark - http://richclarkdesign.com
Twitter: @rich_clark
*/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
@anandpdoshi
anandpdoshi / 2013_04.css
Last active December 16, 2015 17:08
ERPNext Open Day - April 2013 by Anand Doshi
/*
fallback-message display / hide
*/
.fallback-message {
line-height: 1.3;
width: 780px;
padding: 10px 10px 0;
margin: 20px auto;
@anandpdoshi
anandpdoshi / 2013_03.css
Last active December 15, 2015 12:29
ERPNext Open Day - March 2013 Presentation
/*
fallback-message display / hide
*/
.fallback-message {
line-height: 1.3;
width: 780px;
padding: 10px 10px 0;
margin: 20px auto;