Skip to content

Instantly share code, notes, and snippets.

rodelrod / geot-redirects.php
Created October 15, 2016 16:44 — 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 December 16, 2016 18:41 — 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 September 24, 2015 13:44
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.