Skip to content

Instantly share code, notes, and snippets.

View jevy's full-sized avatar

Jevin Maltais jevy

View GitHub Profile
@jevy
jevy / gist:7ece92c1a0d4d6d57294
Created January 3, 2015 02:43
Have Hazel sort images by exif date
# In Hazel select "run shell script". Shell is /bin/bash
/usr/local/bin/exiftool -d %Y-%m "-directory<AllDates" $1
@jevy
jevy / gist:3623438
Created September 4, 2012 16:57
Sample multiple product creation (v4)
{
"order":
{
"language_pref": "en",
"source_id":"iPhone v3.3",
"products_attributes": [
{
"type": "Postcard",
"message_text": "Check out this awesome picture!",
"image_external_id": "1111-1111-1111-1111",
@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,