Skip to content

Instantly share code, notes, and snippets.

View Breefield's full-sized avatar

Bree Hoffman Breefield

View GitHub Profile
@Breefield
Breefield / test.rb
Created April 8, 2014 01:15
Testing
"wow".downcase
@Breefield
Breefield / wanelo.rb
Created June 17, 2014 19:59
Dump items from Svpply onto Wanelo.
#!/usr/bin/env ruby
require 'rubygems'
require 'json'
require 'pp'
require 'open-uri'
require 'cgi'
require 'httparty'
affiliate_id = 'olenaw-20'

Keybase proof

I hereby claim:

  • I am breefield on github.
  • I am breefield (https://keybase.io/breefield) on keybase.
  • I have a public key whose fingerprint is B286 EB99 80CE 619E 5C1D 8DA4 4FDD ED6F A310 5C0D

To claim this, I am signing this object:

//
// Stripe.m
// Stripe
//
// Created by Saikat Chakrabarti on 10/30/12.
// Copyright (c) 2012 Stripe. All rights reserved.
//
#import "STPAPIConnection.h"
#import "Stripe.h"
@Breefield
Breefield / weekly_email.rb
Created February 11, 2015 18:55
Weekly Event Mailer
<h2>This week's parties!</h2>
These parties are all in/close to <%= @user.profile.location %> - because you set your Speakeasy profile's location to there.
<br>You can change your location by <%= link_to "updating your profile", edit_profile_url(:subdomain => 'www') %>.
<br>
<%
# List events at top of email
day = nil
@locations.each do |location|
event = location.event
ls /dev/tty.*
screen /dev/tty.usbmodem14301 115200
import time
i = 0
while True:
i += 1
print("ping" if i % 2 else "pong")
time.sleep(0.5)
CREATE TABLE inventory (
id SERIAL PRIMARY KEY,
item VARCHAR(255) NOT NULL,
price INTEGER NOT NULL,
created_on TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_on TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE inventory_audit AS TABLE inventory WITH NO DATA;
ALTER TABLE inventory_audit ADD COLUMN _deleted BOOLEAN DEFAULT FALSE;
ALTER TABLE inventory_audit ADD COLUMN audit_id SERIAL PRIMARY KEY;
ALTER TABLE inventory_audit ADD COLUMN _created_on TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
CREATE INDEX idx_inventory_audit_id ON inventory_audit (id);