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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Usage: | |
dayone-to-b3.py [options] | |
Options: | |
-p, --path=<path> top directory of your blog. [default: .] | |
""" |
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
from area53 import route53 | |
from boto.route53.exception import DNSServerError | |
import requests | |
import sys | |
from datetime import datetime | |
# Modified from https://markcaudill.me/blog/2012/07/dynamic-route53-dns-updating-with-python/ | |
domain = 'domain.tld' | |
subdomain = 'subdomain_name' |
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
<script> | |
$.getJSON('/_/js/url_mapper.json', function(data) { | |
path = location.pathname.split("/") ; | |
if ( path[1] == "post" ){ | |
id = path[2]; | |
if ( data[id] ) { | |
$('#msg_en').html("The page you are looking has probably moved to \<a href=\"" + data[id] + "\"\>" + data[id] + "\</a\>.") ; | |
} | |
} | |
}); |
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
python listener.py | while read tag feed ; do | |
echo ">>>" $feed "updated!" | |
if [[ "$feed" == "http://picks.vrypan.net/rss" ]]; then | |
... do something here, like reading the new feed items, and post them to a different service. | |
... | |
fi | |
echo "<<<" | |
done |
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 re | |
import cherrypy | |
import sys | |
class Root(object): | |
@cherrypy.expose | |
def default(self, **kwargs): | |
print kwargs | |
return 'OK' |
NewerOlder