This file contains hidden or 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
$ brew install -v liblastfm | |
==> Downloading https://github.com/mxcl/liblastfm/tarball/0.3.3 | |
Already downloaded: /Library/Caches/Homebrew/liblastfm-0.3.3.tgz | |
/usr/bin/tar xf /Library/Caches/Homebrew/liblastfm-0.3.3.tgz | |
==> ./configure --release --prefix /usr/local/Cellar/liblastfm/0.3.3 | |
./configure --release --prefix /usr/local/Cellar/liblastfm/0.3.3 | |
==> Configuring liblastfm-0.3.3... | |
Using /usr/local/bin/qmake | |
==> Determining installation prefix | |
Will install to: /usr/local/Cellar/liblastfm/0.3.3 |
This file contains hidden or 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
$ brew doctor | |
Your system is raring to brew. | |
$ brew --config | |
HOMEBREW_VERSION: 0.9 | |
HEAD: dc7b6207549f1d87a2188177d8a957deab11fce9 | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_CELLAR: /usr/local/Cellar |
This file contains hidden or 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
// | |
// TOBandEqualizer.h | |
// EqualizerTest | |
// | |
// Created by Tobias Ottenweller on 17.08.12. | |
// Copyright (c) 2012 Tobias Ottenweller. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import <AudioToolbox/AudioToolbox.h> |
This file contains hidden or 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
// AppState.swift | |
struct AppState: StateType { | |
var places: PlacesSearchResult? | |
} | |
// AppReducer.swift | |
func appReducer(action: Action, state: AppState?) -> AppState { | |
return AppState(places: nil) | |
} |
This file contains hidden or 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
struct FetchPlacesAction: Action { } | |
class ViewController: UIViewController { | |
override func viewDidAppear(_ animated: Bool) { | |
super.viewDidAppear(animated) | |
appStore.dispatch(FetchPlacesAction()) | |
} | |
} |
This file contains hidden or 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
func fetchPlaces(state: AppState, store: AppStore) -> Action? { | |
let service = PlacesService([…]) | |
let fakeCoordinates = […] | |
let radius = […] | |
service.search(coordinates: fakeCoordinates, radius: radius) { result in | |
guard let places = result.value else { | |
return | |
} |
This file contains hidden or 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
public typealias DispatchFunction = (Action) -> Void | |
public typealias Middleware<State> = (@escaping DispatchFunction, @escaping () -> State?) | |
-> (@escaping DispatchFunction) -> DispatchFunction |
This file contains hidden or 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
let logMiddleware: Middleware<StateType> = { dispatch, getState in | |
return { next in | |
return { action in | |
print(action) | |
next(action) | |
} | |
} | |
} |
This file contains hidden or 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
func logMiddleware(action: Action, context: MiddlewareContext<AppState>) -> Action? { | |
print(action) | |
return action | |
} | |
let actualMiddleware = createMiddleware(logMiddleware) |
This file contains hidden or 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
enum PlacesAction: Action { | |
case fetch | |
case set(PlacesSearchResult) | |
} |
OlderNewer