Skip to content

Instantly share code, notes, and snippets.

View arpithkp's full-sized avatar

Arpith Kuppur Prakash arpithkp

  • Rackspace
  • Austin
View GitHub Profile
def retry(func, timeout=DEFAULT_TIMEOUT, retry_delay=DEFAULT_SLEEP, backoff=DEFAULT_BACKCOFF,
retry_exceptions=(RateLimit, socket.error, socket.gaierror, httplib.NotConnected,
httplib.ImproperConnectionState), *args, **kwargs):
"""
Retry decorator helps to handle common exception.
:param timeout: Default timeout
"""
timeout = timeout
bsleep = retry_delay
backoff = backoff

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

#!/usr/bin/env python
#
# Converts any integer into a base [BASE] number. I have chosen 62
# as it is meant to represent the integers using all the alphanumeric
# characters, [no special characters] = {0..9}, {A..Z}, {a..z}
#
# I plan on using this to shorten the representation of possibly long ids,
# a la url shortenters
#
#!/bin/bash
# Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/
# Install stuff #
#################
# Install development tools and some misc. necessary packages
yum -y groupinstall "Development tools"
yum -y install zlib-devel # gen'l reqs