Skip to content

Instantly share code, notes, and snippets.

View vaibhav-jain's full-sized avatar
🏠
Working remotely @newpage solutions inc

vaibhav jain vaibhav-jain

🏠
Working remotely @newpage solutions inc
View GitHub Profile
@vaibhav-jain
vaibhav-jain / git
Last active June 7, 2019 07:53 — forked from stuart11n/gist:9628955
Rename git branch
==============
git commands
==============
To rename branch
=================
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@vaibhav-jain
vaibhav-jain / archive.py
Last active August 29, 2015 14:07 — forked from Eccenux/archive.py
#!/usr/bin/env python
import os
import zipfile
"""
Helper class that lets one add whole directory contents.
License
--------------------
export PIP_DOWNLOAD_CACHE=/var/lib/jenkins/pip-cache
export AQUIPAGO_ENVIRONMENT=testing
make
env/bin/pip install -r requirements/base.txt --download-cache=/var/lib/jenkins/pip-cache --use-mirrors --timeout 1
env/bin/pip install -r requirements/project.txt --download-cache=/var/lib/jenkins/pip-cache --use-mirrors --timeout 1
env/bin/python runtests.py || :
env/bin/pylint --rcfile=.pylintrc aquipago --ignore=test > reports/pylint.txt || :
@vaibhav-jain
vaibhav-jain / forms.py
Last active August 29, 2015 14:07 — forked from neara/forms.py
from django.forms import ModelForm
from django.forms.models import inlineformset_factory
from models import Sponsor, Sponsorship
class SponsorForm(ModelForm):
class Meta:
model = Sponsor
application: <app-engine-id>
version: 1
runtime: python27
threadsafe: yes
api_version: 1
handlers:
- url: /
static_files: _build/html/index.html
upload: _build/html/index.html
@vaibhav-jain
vaibhav-jain / Procfile
Last active August 29, 2015 14:07 — forked from mabroor/Procfile
web: gunicorn -w4 -b0.0.0.0:$PORT app:app