Skip to content

Instantly share code, notes, and snippets.

View conoro's full-sized avatar

Conor O'Neill conoro

View GitHub Profile
@conoro
conoro / gist:997718
Created May 29, 2011 12:05
Comment Complaint Detail
<complaints>
<count> #count </count>
<current_page> #page </current_page>
<pages> #pages </pages>
<per_page> #per_page </per_page>
<complaint>
<comment_id> #id </comment_id>
<reported_by> #id_of_user </reported_by>
<reported_date> #timedate </reported_date>
</complaint>
@conoro
conoro / gist:997721
Created May 29, 2011 12:06
Admin Create Review
<review>
<once>#number</once>
<hash>#encrypted_once</hash>
<name>Placeholder</name>
<email_address>Unique Placeholder</email_address>
<item>Item Name</item>
<itemurl>http://music.loudermusic.net/item.html</itemurl>
<rating>5</rating>
<description>Here is the description (escaped html)</description>
<tags>
@conoro
conoro / gist:997723
Created May 29, 2011 12:07
Admin Create Review Response
<result>
<status>OK CREATED</status>
followed by echo of review contents
</result>
<result>
<status>ERROR_AUTH</status>
<message>Authentication or permissions error</message>
</result>
@conoro
conoro / gist:997724
Created May 29, 2011 12:08
Admin Create Comment
<comment>
<once>#number</once>
<hash>#encrypted_once</hash>
<email_address>Unique Placeholder</email_address>
<content>I completely agree</content>
</comment>
@conoro
conoro / gist:997726
Created May 29, 2011 12:09
Admin Create Comment Response
<result>
<status>OK CREATED</status>
followed by echo of commentcontents
</result>
<result>
<status>ERROR_AUTH</status>
<message>Authentication or permissions error</message>
</result>
@conoro
conoro / facebook.py
Created December 17, 2011 12:24
Hacked version of "official" (but now unsupported) Facebook Python SDK to support OAuth 2.0
#!/usr/bin/env python
#
# Copyright 2010 Facebook
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@conoro
conoro / gist:3130631
Created July 17, 2012 17:10 — forked from JerrySievert/gist:3119325
Working Node.js on Raspberry Pi
These instructions work for the Raspberry Pi running Raspbian (hard float), and include a working NPM:
1. Install Raspbian - http://www.raspbian.org/PiscesImages
2. sudo apt-get install git-core build-essential
3. Check out Node.js source (0.8.2)
4. Apply patch available at https://github.com/gflarity/node_pi (ignore most of the instructions)
5. Set up some variables:
$ export GYP_DEFINES="armv7=0"
$ export CXXFLAGS='-march=armv6 -mfpu=vfp -mfloat-abi=hard -DUSE_EABI_HARDFLOAT'
#!/bin/bash
export AWS_ACCESS_KEY_ID=YOUR_ACCESS_KEY
export AWS_SECRET_ACCESS_KEY=YOUR_SECRET_ACCESS_KEY
export PASSPHRASE=YOU_PASSHRASE
# directories, space separated
SOURCE="/home/thomas/backup /home/thomas/bin /home/thomas/documents"
BUCKET=s3+http://mybucket
LOGFILE=/home/thomas/tmp/duplicity.log
# set email to receive a backup report
/* HC-SR04 Sensor
https://www.dealextreme.com/p/hc-sr04-ultrasonic-sensor-distance-measuring-module-133696
This sketch reads a HC-SR04 ultrasonic rangefinder and returns the
distance to the closest object in range. To do this, it sends a pulse
to the sensor to initiate a reading, then listens for a pulse
to return. The length of the returning pulse is proportional to
the distance of the object from the sensor.
The circuit:
Verifying myself: My Bitcoin username is +conor. https://onename.io/conor