Skip to content

Instantly share code, notes, and snippets.


Tarun Bhardwaj tarunbhardwaj

View GitHub Profile
tarunbhardwaj / bulk-permission.js
Created Aug 28, 2015
A JS hack to grant permission of PyPi ( ) packages in bulk :)
View bulk-permission.js
// For
// Inject jquery before following script
// My quick jquery injector:
// javascript:var b=document.body;if(b){void(z=document.createElement('script'));void(z.type='text/javascript');void(z.src='');void(b.appendChild(z));}else{}
var links = $("#document-navigation ul a");
var test = links.each(function(index, link){
var package = $(link).html();
View designer.html
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
tarunbhardwaj / UPS-Respose.xml
Created Dec 11, 2014
The Response from UPS address validation
View UPS-Respose.xml
cat << EOF
usage: $0 options
This script set ownership for all table, sequence and views for a given database
Credit: Based on by Alex Soto
tarunbhardwaj /
Last active Dec 9, 2015
Render JInja template as static site using Flask
#!/usr/bin/env python
# -*- coding: utf-8 -*-
Jinja2 static site renderer using Flask
@author Tarun Bhardwaj
@license FreeBSD Licence
from flask import Flask, abort, render_template
from jinja2 import TemplateNotFound
tarunbhardwaj / Openerp_partners
Created Jul 4, 2013
JS Bot to load all partners of OpenERP
View Openerp_partners
Run on
var countries = Array();
$(".oe_countries ul li a").each(function(){
if ($(this).attr("href") != undefined)
"Link": $(this).attr("href"),
"Name": $(this).html(),
tarunbhardwaj /
Created Aug 9, 2013
Script to install package using .travis.yml
#!/usr/bin/env python
Install package from .travis.yml
@author Tarun Bhardwaj
@license FreeBSD Licence
tarunbhardwaj /
Last active Dec 21, 2015 — forked from vishesh/tryton_shell
A simple Tryton shell environment that initializes one database and config file for you. I intend to use to interact with models.Customized: You can directly start using tryton ORM
#!/usr/bin/env python
""" tryton_shell: A dirty shell for Tryton to quickly interact with it
usage: [-h] --config CONFIG --database DATABASE
--config CONFIG Tryton config file.
--database DATABASE Tryton database.
tarunbhardwaj /
Last active Dec 24, 2015
Python wsgi script to dispatch request based on request header

WSGI Script to dispatch request based on request header


pip install flask paste



Setup SFTP with chroot

  1. Create folder to chroot mkdir /opt/sftp

  2. Change ownership chown root:root /opt/sftp

  3. Change mode chmod go-w /opt/sftp

  4. Change sshd config /etc/ssh/sshd_config