Skip to content

Instantly share code, notes, and snippets.

Ravi Kotecha r4vi

Block or report user

Report or block r4vi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View pandas_to_jsongz.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View openhousemaps.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@r4vi
r4vi / testrunner.py
Created Jul 21, 2015
no db test runner
View testrunner.py
from django.test.runner import DiscoverRunner
from django.conf import settings
class NoDbTestRunner(DiscoverRunner):
""" A test runner to test without database creation """
def __init__(self, *args, **kwargs):
kwargs['top_level'] = settings.APPS_ROOT
super(NoDbTestRunner, self).__init__(*args, **kwargs)
View .bash_profile
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
export GITAWAREPROMPT=~/opt/git-aware-prompt
source $GITAWAREPROMPT/main.sh
export PS1="\u@\h \w \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ "
export SUDO_PS1="\[$bakred\]\u@\h\[$txtrst\] \w\$ "
export EDITOR='emacsclient -t'
@r4vi
r4vi / ga.css
Created Jan 19, 2015
stylebot rule for google analytics
View ga.css
a.maia-button.maia-button-secondary.ga-product-cta {
font-size: 12rem;
}
div.ga-hero img {
display: none;
}
View gist:8f505180c0e716be4134
<!--[if lte IE 9]>
<div class="legacy-browser">
<h1>:(</h1>
<p>This service is <strong>not</strong> designed to support your browser.</p>
<p>Please <a href="http://browsehappy.com/">upgrade</a> to the latest version of Chrome, Firefox, Safari or Internet Explorer 11 and above.</p>
</div>
<![endif]-->
View keybase.md

Keybase proof

I hereby claim:

  • I am r4vi on github.
  • I am r4vi (https://keybase.io/r4vi) on keybase.
  • I have a public key whose fingerprint is F8E4 91B4 4765 9C8C A11C 09A8 A48B 120F E8C8 1295

To claim this, I am signing this object:

@r4vi
r4vi / gist:8008148
Created Dec 17, 2013
python threading
View gist:8008148
#!/usr/bin/python
import threading
import time
class Sleepy(threading.Thread):
def run(self):
time.sleep(5)
@r4vi
r4vi / optimize.sh
Last active Dec 15, 2015 — forked from ryansully/optimize.sh
handles files with spaces in the name and keeps EXIF in jpeg
View optimize.sh
#!/bin/sh
# script for optimizing images in a directory (recursive)
# pngcrush & jpegtran settings from:
# http://developer.yahoo.com/performance/rules.html#opt_images
# pngcrush
find $1 -iname "*.png" | while read png
do
echo "crushing $png ..."
@r4vi
r4vi / index.html
Created Dec 1, 2012 — forked from mbostock/.block
World Countries
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.country {
fill: #b8b8b8;
stroke: #fff;
stroke-width: .5px;
stroke-linejoin: round;
}
You can’t perform that action at this time.