This file contains hidden or 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/python | |
# This script is an adaption of Jeremy Blythe's script (http://jeremyblythe.blogspot.co.uk/2012/05/python-freedns-client-on-raspberry-pi.html) | |
# It will update FreeDNS using multiple keys if you have "Link updates of the same IP together" Disabled. | |
import urllib2 | |
import os.path | |
FREEDNS_URL = 'http://freedns.afraid.org/dynamic/update.php?' | |
OLDIP_FILE = '/var/lib/misc/oldip' |
This file contains hidden or 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
class Petshop < Harbor::Application | |
class Home < Harbor::Controller | |
get "/" do | |
# If the block doesn't return true, the request is immediately halted and you're given a 403. | |
basic_auth { |username, password| [ username, password ] == [ "sam", "harbor" ] } | |
puts "Hello World!" | |
end | |