Skip to content

Instantly share code, notes, and snippets.

View atmshop's full-sized avatar

duong chi dung atmshop

View GitHub Profile
@atmshop
atmshop / freeDNS.py
Created June 4, 2013 21:08 — forked from telekineticyeti/freeDNS.py
Python script to update your FreeDNS account with your new IP
#!/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'
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