Skip to content

Instantly share code, notes, and snippets.

Quinn Stephens QuinnStephens

Block or report user

Report or block QuinnStephens

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View objc-dotenv.m
@interface Environment: NSObject
@property (nonatomic, strong) NSString *domain;
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSString *facebookKey;
-(id)initWithData:(NSDictionary *)data;

The following files show receipt data and Apple's responses from its /verifyReceipt endpoint when enacting a simulated scenario using an iTunes sandbox user.

Real-world scenario we seek to represent

  1. A user purchases an auto-renewing monthly subscription.
  2. The receipt (a.k.a. originalReceipt) from this purchase is posted to /verifyReceipt and the response recorded.
  3. The subscription auto-renews 5 times and then the user turns off auto-renewal, causing the subscription to lapse.
  4. originalReceipt is posted to /verifyReceipt and the response recorded.
  5. Over 60 days pass.
  6. The user purchases an auto-renewing monthly subscription.
  7. The receipt (a.k.a. newReceipt) from the re-subscription is posted to /verifyReceipt and the response recorded.

Keybase proof

I hereby claim:

  • I am quinnstephens on github.
  • I am quinnstephens ( on keybase.
  • I have a public key ASCvyLVCQzLMIrbb-7Qi1AcdttOzBnf1XDGw_WJ2zj3EDgo

To claim this, I am signing this object:

View fantasy_title_generator.rb
@adjectives = [
'ancient', 'magic', 'mystic', 'curious', 'secret', 'hidden', 'forgotten',
'forsaken', 'forbidden', 'exhumed', 'cursed', 'unseen', 'banished',
'frozen', 'crystal', 'diamond', 'ruby', 'emerald', 'sapphire', 'silver',
'golden', 'amber', 'gilded', 'dark', 'darkened', 'darkening', 'moonlit',
'sunlit', 'abyssal', 'deep', 'sacred', 'exalted', 'hunted', 'cold',
'ashen', 'abandoned', 'shining', 'glowing', 'illuminated', 'misty',
'desecrated', 'red', 'blue', 'green', 'violet', 'purple',
'indigo', 'orange', 'cerulean', 'jade', 'rose', 'scarlet', 'crimson',
'winged', 'burning', 'burned', 'drowned', 'sunken', 'shattered',
View .profile
export ENV=development
# Table XI
export TXI_DEVELOPER_USER="[txi email]"
export TXI_DEVELOPER_PASSWORD="[txi apple password]"
export TXI_FABRIC_API_TOKEN='[fabric api token]'
export TXI_FABRIC_BUILD_SECRET='fabric build secret]'
# Commands
alias oops="git reset HEAD~"
View xkcd.em
weights = []
weights.append 215
weights.append 275
weights.append 335
weights.append 355
weights.append 420
weights.append 580
limit = 1505
View xkcd.rb
class MenuSolver
def initialize(weights, limit)
@weights = weights
@limit = limit
self.iterate(0, [])
def iterate (total, order)
@weights.each do |w|
QuinnStephens / .profile
Created Aug 25, 2015
Function for quick unique Android emulator screenshots
View .profile
function acap {
NOW=`date +%s`
adb shell /system/bin/screencap -p /sdcard/screenshot_"${NOW}".png
adb pull /sdcard/screenshot_"${NOW}".png ~/Downloads/screenshot_"${NOW}".png
QuinnStephens / paul_clifford.rb
Last active Aug 29, 2015
Grabs random paragraphs from Edward Butler-Lytton's 1830 novel PAUL CLIFFORD, source of the famous "It was a dark and stormy night." Use it if you're bored of lorem ipsum.
View paul_clifford.rb
require 'nokogiri'
require 'open-uri'
require 'clipboard'
page = Nokogiri::HTML(open(''))
count = ARGV[0] ? ARGV[0].to_i : 1
output = ''
count.times do |i|
output << page.css('p').to_a.sample.text.strip.split.join(' ') << (i < count - 1 ? "\n\n" : "\n")
You can’t perform that action at this time.