Skip to content

Instantly share code, notes, and snippets.

Pete Taylor kimondo

Block or report user

Report or block kimondo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:ba648912c64179e7b8b8
import RPi.GPIO as GPIO
import time
from BeautifulSoup import BeautifulSoup
import urllib2
#change this bit
url="http://www.kimondo.co.uk/swingometer-control/"
page=urllib2.urlopen(url)
soup = BeautifulSoup(page.read())
View gist:42c39f9cc6d6f9c18b2d
<?php
$rss = new DOMDocument();
#feed info here
$rss->load('http://feeds.bbci.co.uk/news/rss.xml');
$feed = array();
foreach ($rss->getElementsByTagName('item') as $node) {
$item = array (
'title' => $node->getElementsByTagName('title')->item(0)->nodeValue,
#I'm just using the title
#'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue,
@kimondo
kimondo / Raspberry Pi Pi-Lite web counter
Created Nov 19, 2013
Raspberry Pi Pi-Lite web counter - grabs some stats off the wordpress stats API and then sends them to the serial port to be picked up by an arduino based LED display (ciseco.co.uk Pi-Lite or wharfe-education.com BelleVue)
View Raspberry Pi Pi-Lite web counter
import serial
import time
import urllib2
from BeautifulSoup import BeautifulSoup
# Configure Pi serial port
s = serial.Serial()
s.baudrate = 9600
s.timeout = 0
@kimondo
kimondo / email to LEDborg script for Raspberry PI
Created Feb 4, 2013
email to LEDborg script for Raspberry Pi
View email to LEDborg script for Raspberry PI
import imaplib
import email
#connect to gmail
mail = imaplib.IMAP4_SSL('imap.gmail.com')
mail.login('your_email_address@gmail.com','your_password')
mail.select('inbox')
mail.list()
You can’t perform that action at this time.