I hereby claim:
- I am shayne on github.
- I am shayne (https://keybase.io/shayne) on keybase.
- I have a public key ASDyQYKTQTZgsHIJo_wBxC2EaPPYCE8QkkBHk4BdK-w0jgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
use LWP::Simple; | |
grammar JsonGrammer { | |
token TOP { <object-value>|<array-value> } | |
token any-value { \s* <string-value>|<numeric-value>|<null-value>|<object-value>|<array-value> \s* } | |
token object-value { '{' <property> [\s* \, \s* <property> \s*]*'}' } | |
token array-value { '[' <any-value> [\s* \, \s* <any-value> \s*]*']' } | |
token property { \s* <key> \s* ':' \s* <any-value> \s* } | |
token key { \" \w+ \" } | |
token any-quotes { <["']> } |
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { | |
// Not needed | |
} | |
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { | |
let indexPath = self.tableView.indexPathForSelectedRow()! | |
let destinationController = segue.destinationViewController as ProductDetailViewController | |
destinationController.productData = products[indexPath.row] as PFObject | |
} |
// | |
// CGViewController.swift | |
// Banksy | |
// | |
// Created by Shayne Sweeney on 11/1/14. | |
// Copyright (c) 2014 App Couture. All rights reserved. | |
// | |
import UIKit |
sudo dscl . -append /groups/wheel GroupMembership <username> | |
# now `sudo visudo` and remove comment from: %wheel ALL=(ALL) NOPASSWD: ALL |
#!/bin/sh | |
open "peepopen://%%%{PBXFilePath}%%%?editor=Xcode" |
[[UIApplication sharedApplication] _performMemoryWarning]; |
#!/usr/bin/env python | |
import os | |
import sys | |
import getopt | |
import boto | |
from sys import stderr | |
_ec2 = None |
#ifdef DEBUG | |
#define DLog(...) NSLog(@"%s:%d %s - %@", __FILE__, __LINE__, __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__]) | |
#define ALog(...) [[NSAssertionHandler currentHandler] handleFailureInFunction:[NSString stringWithCString:__PRETTY_FUNCTION__ encoding:NSUTF8StringEncoding] file:[NSString stringWithCString:__FILE__ encoding:NSUTF8StringEncoding] lineNumber:__LINE__ description:__VA_ARGS__] | |
#else | |
#define DLog(...) do { } while (0) | |
#ifndef NS_BLOCK_ASSERTIONS | |
#define NS_BLOCK_ASSERTIONS | |
#endif | |
#define ALog(...) NSLog(@"%s:%d %s - %@", __FILE_, __LINE__, __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__]) | |
#endif |
require 'rest_client' | |
class GVoice < Struct.new :e, :p | |
def initialize(*args, &block) | |
super; instance_eval &block if block_given? | |
end | |
def send_sms(number, text) | |
post 'sms/send', :phoneNumber => number, :text => text, :_rnr_se => get[/'_rnr_se': '([^']+)'/, 1] | |
end |