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 | |
# From: https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository | |
export DEBIAN_FRONTEND=noninteractive | |
echo "APT::Get::Assume-Yes \"true\";" > /etc/apt/apt.conf.d/90assumeyes | |
sudo apt-get update | |
sudo apt-get install \ | |
apt-transport-https \ |
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
class _ViewModel { | |
final String pageTitle; | |
final List<_ItemViewModel> items; | |
final Function onNewItem; | |
final String newItemToolTip; | |
_ViewModel(this.pageTitle, this.items, this.onNewItem, this.newItemToolTip, this.newItemIcon); | |
factory _ViewModel.create(Store<AppState> store) { | |
List<_ItemViewModel> items = store.state.toDos |
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
AppState appReducer(AppState state, action) => AppState(toDoListReducer(state.toDos, action), listStateReducer(state.listState, action)); | |
final Reducer<List<ToDoItem>> toDoListReducer = // Boilerplate ignored | |
final Reducer<ListState> listStateReducer = combineReducers<ListState>([ | |
TypedReducer<ListState, DisplayListOnlyAction>(_displayListOnly), | |
TypedReducer<ListState, DisplayListWithNewItemAction>(_displayListWithNewItem), | |
]); | |
ListState _displayListOnly(ListState listState, DisplayListOnlyAction action) => ListState.listOnly; |
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
class ToDoListPage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) => StoreConnector<AppState, _ViewModel>( | |
converter: (Store<AppState> store) => _ViewModel.create(store), | |
builder: (BuildContext context, _ViewModel viewModel) => Scaffold( | |
appBar: AppBar( | |
title: Text(viewModel.pageTitle), | |
), | |
body: ListView(children: viewModel.items.map((_ItemViewModel item) => _createWidget(item)).toList()), | |
floatingActionButton: FloatingActionButton( |
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
class AppState { | |
final List<ToDoItem> toDos; | |
final ListState listState; | |
AppState(this.toDos, this.listState); | |
factory AppState.initial() => AppState(List.unmodifiable([]), ListState.listOnly); | |
} | |
enum ListState { |
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
void main() => runApp(ToDoListApp()); | |
class ToDoListApp extends StatelessWidget { | |
final Store<AppState> store = Store<AppState>( | |
appReducer, /* Function defined in the reducers file */ | |
initialState: AppState.initial(), | |
middleware: createStoreMiddleware(), | |
); | |
@override |
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
class DisplayListWithNewItemAction {} |
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
048065b862d831ce6162907fd624ecdf97a91ea30a19a327263d19e2bb687812d2450bfc639ae6ab5d453c14e112869cbc6b8aa972890a6c6b854fd3c6938b3db5 |
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
def versionFile = project.file("version.properties") | |
Version version = Version.read(versionFile) | |
ext { | |
versionizerVersionCode = version.code | |
versionizerVersionName = version.name | |
} | |
task incrementVersionForRelease << { | |
group = 'release' |
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
⋊> /u/local on master brew config 10:25:11 | |
HOMEBREW_VERSION: 0.9.9 | |
ORIGIN: https://github.com/Homebrew/brew.git | |
HEAD: ca005cb8245e7e12ad808d78d49bce3953e1153c | |
Last commit: 65 minutes ago | |
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core | |
Core tap HEAD: 351775d67b2e8145ac665e53ea467cff894473fa | |
Core tap last commit: 5 hours ago | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_REPOSITORY: /usr/local |
NewerOlder