Skip to content

Instantly share code, notes, and snippets.

View just-digital's full-sized avatar

Kevin Sparks just-digital

View GitHub Profile
@just-digital
just-digital / weather.py
Created April 1, 2012 23:50
BOM (Bureau of Meteorology) in Australia have data feeds available for weather. This is a quick convenient python class for fetching that data.
import urllib2
import datetime
"""
Module for implementing BOM services. The BOMForcast class will fetch 7 days
of weather temperature and precis data. It also implements a handy iterator for
looping through forecast days.
See http://www.bom.gov.au/catalogue/data-feeds.shtml for more information on
data feeds available.
@just-digital
just-digital / gist:1868435
Created February 20, 2012 08:33
A .vimrc file for Drupal. Sets correct tabs configuration and a few other gems. Also includes function from Aron Novak (http://drupal.org/user/61864) sourced at http://vim.wikia.com/wiki/Remove_unwanted_spaces which will remove trailing white space upon
set nocompatible
syntax on
filetype on
filetype plugin on
filetype indent on
set sidescroll=1
set sidescrolloff=3
@just-digital
just-digital / manifest_domain.py
Created February 2, 2012 02:59
Simple Python script to manifest a list of potential domain names from a keyword phrase/string. Script will also validate the domain.
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
stopwords = " a to the ltd is for of on will with pty" # not definitive
legalchars = "abcdefghijklmnopqrstuvwxyx1234567890"
replace = (
(("Ã","Å","Ä","À","Á","Â","å","å","ä","à","á","â"),"a"),
(("Ç","Č","ç","č"),"c"),
(("É","È","Ê","Ë","Ĕ","è","ê","ë","ĕ","é"),"e"),