This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(page "index.html") | |
(def multipliers [1 2 4 7 10 15]) | |
(def default-counts [0 0 0 0 0 0]) | |
(defc counts default-counts) | |
(defc= score (reduce + (map * counts multipliers))) | |
(defn increment-counter [idx c] | |
(assoc c idx (inc (get c idx)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diannao:kakoune (11:16) $ lldb kak | |
(lldb) target create "kak" | |
Current executable set to 'kak' (x86_64). | |
(lldb) run | |
Process 58924 launched: '/usr/local/bin/kak' (x86_64) | |
Process 58924 stopped | |
* thread #1: tid = 0x468020, 0x00007fff8b16094a libsystem_kernel.dylib`poll + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP | |
frame #0: 0x00007fff8b16094a libsystem_kernel.dylib`poll + 10 | |
libsystem_kernel.dylib`poll + 10: | |
-> 0x7fff8b16094a: jae 0x7fff8b160954 ; poll + 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Dumb way (list monad): | |
combine = do | |
a <- list1 | |
b <- list2 | |
c <- list3 | |
return [a, b, c] | |
-- OK way (list monad): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"{{{ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSLog(@"BUILD VERSION: %@", [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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:)]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
OlderNewer