Skip to content

Instantly share code, notes, and snippets.

View jjthrash's full-sized avatar

Jimmy Thrasher jjthrash

View GitHub Profile
-- Dumb way (list monad):
combine = do
a <- list1
b <- list2
c <- list3
return [a, b, c]
-- OK way (list monad):
"{{{ stuff specifically for GUI-mode...
if version >= 500
" switch syntax highlighting on when the terminal has colors;
" switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
" on terminal and in gui mode, background is dark...
set background=dark
syntax on
hi Folded guifg=Black guibg=DarkMagenta gui=bold
-- given multi-line input where options are stated per line, spit out all possible options
import System.IO
main = do
input <- getContents
putStrLn $ show $ sequence $ map (words) $ lines input
@jjthrash
jjthrash / allowanimations.diff
Created November 6, 2009 15:45
Allow users of Airship/StoreFront API to specify their own animations
diff --git a/Airship/StoreFront/StoreFront.h b/Airship/StoreFront/StoreFront.h
index 740467a..8433950 100644
--- a/Airship/StoreFront/StoreFront.h
+++ b/Airship/StoreFront/StoreFront.h
@@ -44,6 +44,7 @@
SINGLETON_INTERFACE(StoreFront)
++(UIView*)makeStoreFrontView;
+(void)displayStoreFront;
#!/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
NSLog(@"BUILD VERSION: %@", [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]);
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:)];
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;
{"data":{"customer_id":4279,"email":"jimmy@groopdinc.com"}}
{
"data": {
"shipping": {
"city": "Efland",
"address": "8323 Hertford Dr",
"zip": "27243",
"state": "NC"
},
"billing": {
"address": "8323 Hertford Dr",