Skip to content

Instantly share code, notes, and snippets.

View jevy's full-sized avatar

Jevin Maltais jevy

View GitHub Profile
@jevy
jevy / waterlevel.R
Created August 15, 2012 12:51
R code to generate graph of Water Levels in Ottawa
## changeing the working directory.
diegoDir='/Users/jevin/Code/personal/r/waterLevel'
setwd(diegoDir)
require(XML)
## getting the data from the web
x = readLines("http://www.ottawariver.ca/arnprior.htm")
tableNodes = getNodeSet(htmlParse(paste('</br>', x)), "//table")
@jevy
jevy / gist:2995738
Created June 26, 2012 13:17
Device Identifier Integration Spec
require 'spec_helper'
# Type of discount: Free product (postcard)
# Conditions: Start/Stop (Aug X, Aug Y)
# Minimum number of specified products purchased: 1 Postcard
# Maximum # of total uses: 20
# Used by anyone (any device as he might pass it to his friends)
describe 'Unique device promo code', :focus do
@jevy
jevy / gist:1477961
Created December 14, 2011 19:00
Sample API for a Postcard Design
{ design:
product: 5, # The ID of the postcard product
pages: [
images: [
main_image # ID of the image uploaded elsewhere
]
,
text_fields: [
sender_name,
sender_street,