Skip to content

Instantly share code, notes, and snippets.

View billday's full-sized avatar

Bill Day billday

View GitHub Profile
@billday
billday / GMT.time.example.gpx
Created April 2, 2012 20:55
RunKeeper user data export timezone example
<?xml version="1.0" encoding="UTF-8"?>
<gpx
version="1.1"
creator="RunKeeper - http://www.runkeeper.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.topografix.com/GPX/1/1"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"
xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1">
<trk>
@billday
billday / Example Health Graph data export GPX
Created February 27, 2012 22:46
This is an abridged example GPX file containing GPS track information exported as a part of RunKeeper's Health Graph user data export function. Details: http://blog.healthgraph.com/2012/02/27/user-data-export
<?xml version="1.0" encoding="UTF-8"?>
<gpx
version="1.1"
creator="RunKeeper - http://www.runkeeper.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.topografix.com/GPX/1/1"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
<trk>
<name><![CDATA[Running 2/26/12 9:01 am]]></name>
@billday
billday / nvp_GetBalance.php
Created May 1, 2011 23:56
Performs "GetBalance" PayPal API call, returning result in name-value pairs
<?php
$environment = 'sandbox'; // or 'beta-sandbox' or 'live'
/**
* Send HTTP POST Request
*
* @param string The API method name
* @param string The POST Message fields in &name=value pair format
* @return array Parsed HTTP Response body
@billday
billday / hello.php
Created May 1, 2011 19:52
Hello Dolly WP plugin
<?php
/*
Plugin Name: Hello Dolly
Plugin URI: http://wordpress.org/#
Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation
summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will
randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page.
Author: Matt Mullenweg
Version: 1.5
Author URI: http://ma.tt/
.Net
Adaptive Accounts
Adaptive Payments
Alternative Ways to Fund Your Project
analytics
Android
{...}
csvtopics = open("devzone.topics.csv", "rb")
topicreader = csv.reader(csvtopics, dialect='excel')
csvnumitems = open(devzonedir+"devzone.topics.items.csv", "wb")
numitemswriter = csv.writer(csvnumitems, dialect='excel')
for topic in topicreader:
currenttopic = topic[0]
topicfile = (currenttopic.replace(' ', '')).replace('.', 'dot')
csvcurrenttopic = open(devzonedir+"devzone.analysis.topic."+topicfile+".csv", "wb")
topicwriter = csv.DictWriter(csvcurrenttopic, fieldnames=['pubDate', 'articleOrBlog', 'title', 'link', 'hitCount'], restval='', extrasaction='ignore', dialect='excel')
31 Jan 2011 18:31:26,article,PayPal and the Road to Adaptive Payments,https://www.x.com/docs/DOC-3191,,{content of article would be here}
for row in articles.rows:
row["articleOrBlog"] = "article"
date = row["pubDate"]
date = date[5:-4]
row["pubDate"] = date
csvwriter.writerow(row)
select * from rss where url in ('https://www.x.com/people/ptwobrussell/blog/feeds/posts?numItems=20', 'https://www.x.com/people/billday/blog/feeds/posts?numItems=20', 'https://www.x.com/people/travis/blog/feeds/posts?numItems=20', 'https://www.x.com/blogs/Ethan/feeds/posts?numItems=20', 'https://www.x.com/community/feeds/blogs?community=2133&numItems=1000', 'https://www.x.com/community/feeds/documents?community=2133&numItems=200')
import yql
y = yql.Public()
articlequery = "select * from rss where url in ('https://www.x.com/community/feeds/documents?community=2133&numItems=38')"
articles = y.execute(articlequery)