Skip to content

Instantly share code, notes, and snippets.

Avatar

Pete plamoni

View GitHub Profile
View gist:0da5e7aecd63e259955b
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TrainingCenterDatabase xmlns="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2">
<Activities>
<Activity Sport="Running">
<Id>2015-10-31T07:55:06.000-07:00</Id>
<Lap StartTime="2015-10-31T07:55:06.000-07:00">
<TotalTimeSeconds>565.0</TotalTimeSeconds>
<DistanceMeters>1610.0</DistanceMeters>
<Calories>139</Calories>
@plamoni
plamoni / README.txt
Created Dec 26, 2011
SiriProxy Upstart Script
View README.txt
Some things to note:
I'm running SiriProxy on port 2000 using a non-privileged user. I'm then redirecting internal network traffic
using iptables from port 443 to port 2000. This is more secure than running SiriProxy as root. I also have it
set up to respawn SiriProxy when it dies (which happens pretty regularly). Finally, I'm dumping all the output
to /tmp/siriproxy (in theory), but I don't seem to get output to that log. Which is unfortunate. Maybe someone
can explain what's wrong there. I'm really not an expert in Upstart either. :-)
As usual, simply copying/pasting this stuff anywhere will get you pretty much nowhere. You need to have some idea
what you're doing to make this work. Good luck!
@plamoni
plamoni / gist:1428474
Created Dec 3, 2011
Line by line input for how I got SiriProxy running on a fresh install of Ubuntu 11.10
View gist:1428474
#Here's what I did to get to the point where I'm at:
#-Install Ubuntu 11.10
#-Get all available updates
#-Add the VirtualBox add-ons and video driver
#-Set up SSH (for the SCP at the end)
#
# I have done nothing else to this virtual machine.
# On my iPhone, I set the DNS server to 192.168.2.131 (the IP of the virtual machine)
View gist:1396150
dhcp-129:SiriProxy plamoni$ siriproxy bundle
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
View sampleplugins.rb
class SiriProxy::Plugin::Twitter < SiriProxy::Plugin
# this watches when in the default context
listen_for /tweet (.*)/ do |data, tweetText|
show_rich_snippet do
image 'http://cl.ly/1l040J1A392n0M1n1g35/content' # this just makes things looks nice, but is obviously specific to my username
text tweetText
end
# this locks out other plugins until a confirmation or deny
confirm do
You can’t perform that action at this time.