View geot-redirects.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Create Custom Redirects from home page only | |
* @link http://wp.timersys.com/geotargeting/ | |
* | |
* @wordpress-plugin | |
* Plugin Name: GeoTargeting Pro Custom Redirects | |
* Plugin URI: http://wp.timersys.com/geotargeting/ | |
* Description: Geo Targeting custom redirects | |
* Version: 1.0.0 |
View tmux.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.tmux.conf | |
# | |
# Forked from: https://gist.github.com/shinzui/866897 | |
# | |
# Set prefix key to Ctrl-a | |
unbind-key C-b | |
set-option -g prefix C-a | |
# send the prefix to client inside window |
View retry.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
Args: |