Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
perplexed

Rushabh Mehta rmehta

💭
perplexed
View GitHub Profile
View debug.sql
test_inner_mapping (frappe.event_streaming.doctype.event_producer.test_event_producer.TestEventProducer) ... select `name` from `tabEvent Producer` where `name` = 'http://test_site_producer:8000' order by modified desc
select * from `tabEvent Producer` where `name` = 'http://test_site_producer:8000' order by modified desc
16:11:53 worker_default.1 | select * from `tabDocPerm` where `parent` = 'Document Follow' and `parenttype` = 'DocType' and `parentfield` = 'permissions' order by idx asc
select * from `tabEvent Producer Document Type` where `parent` = 'http://test_site_producer:8000' and `parenttype` = 'Event Producer' and `parentfield` = 'producer_doctypes' order by idx asc
select `password` from `__Auth`
View startup_gov.md

Job Posting: Full Stack Software Engineer

Introduction

This is an opportunity to work inside one of the largest government bodies in India to deliver and deploy Free and Open Source solutions to various internal departments that benefit millions of users and citizens.

Requirement

  1. Fresher or fresh engineer with 2-3 years experience
@rmehta
rmehta / shishuvan_next_steps.md
Last active Jul 13, 2018
Shishuvan Next Steps
View shishuvan_next_steps.md

The resignations of the principal, vice principal and many staff have rattled all parents. Due to parent mobilization, 900 parents have come forward and asked questions.

People are worried what is next? There has been a thought, that there needs to be a representation from the side of the parents, and things coming out in an open forum is a bad thing.

As I have been one of the persons who has come out in the open in support of the Shishuvan Philosophy and the leadership team, staff and teachers, a lot of people want to talk with me. Many people are worried about the public perception of the school and want things to be settled down.

Since I have been having the same conversation again and again on phone, here are my views on what should be next steps:

  1. The Trust must sit with Management, Leadership team and staff and settle the differences to satisfaction of all parties (not involving parents).
  2. After settlement, everyone must address a joint open sabha, outlining steps they have taken to resolve t
View website-talk.md
  • new-site
  • install app
  • setup wizard
  • home page

Inaugurated in 1969, the National Centre for the Performing Arts (NCPA), Mumbai, is India's premier cultural institution. The first multi-venue, multi-purpose cultural centre to be built in South Asia, it has been committed since its inception to preserving and promoting the country's rich and vibrant heritage of Indian and international music, dance, theatre, film, literature and photography as well as presenting new and innovative work in the field of the performing arts.

  • style
@rmehta
rmehta / demo_maker.py
Created Mar 27, 2017
simple hack to make erpnext demo using selenium and text-to-speech
View demo_maker.py
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
from subprocess import Popen
def say(what):
Popen(['say', what, '-v', 'Samantha'])
class Browser(webdriver.Chrome):
def __init__(self):
@rmehta
rmehta / jinja_style_microtemplates.js
Created Dec 9, 2016
A simple microtemplating function in Javascript to parse Jinja style tags, for and if statements
View jinja_style_microtemplates.js
// Simple Jinja Style templates in Javascript
// Adapted from microtemplate.js by John Resig
// http://ejohn.org/blog/javascript-micro-templating/
// usage:
// tepmlate_name = "Testing";
// render_template('{% if template_name %}<h1>{{ template_name }}{% endif %}');
var compiled_templates = {};
View sessions.diff
- simultaneous_sessions = frappe.db.get_value('User', user, 'simultaneous_sessions') or 1
+ limit = 0
+ if user==frappe.session.user:
+ # logging out self
+ # keep my other sessions active
+ simultaneous_sessions = frappe.db.get_value('User', user, 'simultaneous_sessions') or 1
+ limit = simultaneous_sessions - 1
condition = ''
if keep_current:
View frappe-form_script.js
frappe.ui.form.on('Your DocType', 'button', function(frm) {
frm.set_value('total', frm.doc.value1 + frm.doc.value2 + frm.doc.value3);
});
View frappe-orm.py
# $ bench --site yoursitename console
for d in frappe.get_all('Your DocType', filters={'company': old_company}):
doc = frappe.get_doc('Your DocType', d.name)
doc.company = new_company
doc.save()
View petition.md

Petition for mandating use of Free and Open Source in New Education Policy Draft circulated by Government of India

For the first time, the Government of India is embarking on a time-bound grassroots consultative process, which will enable the Ministry of HRD to reach out to individuals across the country through over 2.75 lakh direct consultations while also taking input from citizens online.

Here is the draft policy http://mhrd.gov.in/nep-new

In reference to this, we find it strange that the government has not included the mandate for schools to use Free and Open Source Software. Not only is Free Software cost effective, there are many other benefits.