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
<?php | |
function ernest_marples($postcode) { | |
$postcode = str_replace(" ", "", $postcode); | |
$url = "http://www.uk-postcodes.com/postcode/". urlencode($postcode) .".csv"; // Build the URL | |
$file = file_get_contents($url); | |
if (strpos($file, "html") === FALSE) { // Some error checking - if the file contains html, then we've been redirected to the homepage and something has gone wrong |
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
<?php | |
function ernest_marples($postcode) { | |
$postcode = str_replace(" ", "", $postcode); | |
$url = "http://www.uk-postcodes.com/postcode/". urlencode($postcode) .".csv"; // Build the URL | |
$file = file_get_contents($url); | |
if (strpos($file, "html") === FALSE) { // Some error checking - if the file contains html, then we've been redirected to the homepage and something has gone wrong |
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
<?php | |
/* | |
Plugin Name: Planning Alerts Widget | |
Plugin URI: http://www.pezholio.co.uk | |
Description: Provides a widget showing the latest planning applications around a given postcode area. Based on Philip John's Opening Times Widget (http://philipjohn.co.uk/category/plugins/opening-times/) | |
Author: Stuart Harrison | |
Version: 0.11b | |
Author URI: http://www.pezholio.co.uk | |
*/ | |
/* This program is free software; you can redistribute it and/or modify |
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
<?php | |
// Two Custom functions to parse XML from external feeds. The first one is used to return an associative array from an XML document, and the second one gets the data via CURL and returns the array. The rest is up to you!! | |
function xml2array($contents, $get_attributes=1) { | |
if(!$contents) return array(); | |
if(!function_exists('xml_parser_create')) { | |
//print "'xml_parser_create()' function not found!"; | |
return array(); |
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
<?php | |
/* A (slightly hacky) script to return the page title, url and number of pageviews from the Google Analytics API as a tab-separated CSV file. No guarantee that it'll work, but worked for me! */ | |
header("Content-type: application/octet-stream"); | |
header("Content-Disposition: attachment; filename=\"analytics.csv\""); | |
function xml2array($contents, $get_attributes=1) { | |
if(!$contents) return array(); | |
if(!function_exists('xml_parser_create')) { |
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
<!DOCTYPE html> | |
<html><head> | |
<title>Fork-A-Twitter-Client</title> | |
<!-- | |
Basic OniApollo/StratifiedJS Twitter Client application scaffold. | |
See http://fatc.onilabs.com/ | |
THIS FILE IS IN THE PUBLIC DOMAIN. | |
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
L.TileLayer.Bing = L.TileLayer.extend({ | |
supportedTypes: ['Road', 'Aerial', 'AerialWithLabels'], | |
attributionTemplate: '<span style="display:inline-block">' + | |
'<a target="_blank" href="http://www.bing.com/maps/">' + | |
'<img src="{logo}" /></a><br><span>{copyrights}' + | |
'<a style="white-space: nowrap" target="_blank" '+ | |
'href="http://www.microsoft.com/maps/product/terms.html">' + | |
'Terms of Use</a></span></span>', |
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
Building native extensions. This could take a while... | |
ERROR: Error installing pg: | |
ERROR: Failed to build gem native extension. | |
/Users/Stuart/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb | |
checking for pg_config... yes | |
Using config values from /usr/local/bin/pg_config | |
checking for libpq-fe.h... yes | |
checking for libpq/libpq-fs.h... yes | |
checking for PQconnectdb() in -lpq... yes |
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
stuart-harrisons-macbook-pro:~ Stuart$ sudo gem install passenger | |
Password: | |
Successfully installed passenger-3.0.11 | |
1 gem installed | |
Installing ri documentation for passenger-3.0.11... | |
Installing RDoc documentation for passenger-3.0.11... | |
stuart-harrisons-macbook-pro:~ Stuart$ sudo passenger-install-apache2-module | |
/Users/Stuart/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find passenger (>= 0) amongst [minitest-1.6.0, rake-0.8.7, rdoc-2.5.8] (Gem::LoadError) | |
from /Users/Stuart/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec' | |
from /Users/Stuart/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb:1210:in `gem' |
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
/Users/Stuart/.rbenv/versions/1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb:314:in `bin_path': can't find gem rails ([">= 0"]) with executable rails (Gem::GemNotFoundException) | |
from /usr/bin/rails:19:in `<main>' |
OlderNewer