Skip to content

Instantly share code, notes, and snippets.

View jjthrash's full-sized avatar

Jimmy Thrasher jjthrash

View GitHub Profile
@jjthrash
jjthrash / gist:1025223
Created June 14, 2011 16:05
This is a mime type?
application/vnd.openxmlformats-officedocument.wordprocessingml.document
@jjthrash
jjthrash / quick_config.rb
Created June 8, 2011 14:16
Heroku API config (use ENV
# Use like this:
# QuickConfig.api(:spreedly, 'SPREEDLY_CORE_LOGIN', 'SPREEDLY_CORE_SECRET') do
# SpreedlyCore.configure(ENV['SPREEDLY_CORE_LOGIN'],
# ENV['SPREEDLY_CORE_SECRET'],
# SPREEDLY_CORE[Rails.env]['token'])
# end
#
# or
#
# QuickConfig.api(:janrain, 'JANRAIN_API_KEY')
@jjthrash
jjthrash / gist:807830
Created February 2, 2011 15:22
Delayed Transition for Scriptaculous
function delayedTransition(delayFraction, baseTransition) {
return function(pos) {
if (pos < delayFraction)
return 0;
else
return baseTransition((pos - delayFraction) / (1 - delayFraction));
}
}
macruby-0.6 > " hello, world ".stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet)
=> "hello, world"
{
"data": {
"shipping": {
"city": "Efland",
"address": "8323 Hertford Dr",
"zip": "27243",
"state": "NC"
},
"billing": {
"address": "8323 Hertford Dr",
{"data":{"customer_id":4279,"email":"jimmy@groopdinc.com"}}
diff --git a/Airship/StoreFront/StoreFrontDelegate.h b/Airship/StoreFront/StoreFrontDelegate.h
index 98ceb74..5d6c06a 100644
--- a/Airship/StoreFront/StoreFrontDelegate.h
+++ b/Airship/StoreFront/StoreFrontDelegate.h
@@ -32,5 +32,6 @@
@optional
-(void)storeFrontDidHide;
-(void)storeFrontWillHide;
+-(BOOL)shouldDisplayProduct:(UAProduct*)product;
diff --git a/Airship/StoreFront/UAInventory.m b/Airship/StoreFront/UAInventory.m
index 92563d0..9088f85 100644
--- a/Airship/StoreFront/UAInventory.m
+++ b/Airship/StoreFront/UAInventory.m
@@ -55,9 +55,13 @@
return productList;
}
+- (NSArray*)sortedKeys {
+ return [[productList allKeys] sortedArrayUsingSelector:@selector(compare:)];
NSLog(@"BUILD VERSION: %@", [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]);
#!/bin/bash
set -e
if [ -x /usr/local/bin/git ]; then
export GIT=/usr/local/bin/git
elif [ -x /usr/bin/git ]; then
export GIT=/usr/bin/git
else
exit 0