Skip to content

Instantly share code, notes, and snippets.

rodelrod / geot-redirects.php
Created Oct 15, 2016 — forked from timersys/geot-redirects.php
Geotargeting redirects
View geot-redirects.php
* Create Custom Redirects from home page only
* @link
* @wordpress-plugin
* Plugin Name: GeoTargeting Pro Custom Redirects
* Plugin URI:
* Description: Geo Targeting custom redirects
* Version: 1.0.0
rodelrod / tmux.conf
Last active Dec 16, 2016 — forked from shinzui/tmux.conf
View tmux.conf
# ~/.tmux.conf
# Forked from:
# Set prefix key to Ctrl-a
unbind-key C-b
set-option -g prefix C-a
# send the prefix to client inside window
rodelrod /
Created Sep 24, 2015
Retry: Invokes repeatedly function calls that may raise an exception, until they don't
import time
def retry(f, tries, exc, pause=0, *args, **kwargs):
"""Repeats function n times until it succeeds or we give up.
Use case: `f` invokes an API that may fail or be unavailable. We assume
`f` raises an exception when something goes wrong. We can use this
function to invoke `f` multiple times until an exception is not raised.