Skip to content

Instantly share code, notes, and snippets.

View craigomac's full-sized avatar

Craig McMahon craigomac

View GitHub Profile
@craigomac
craigomac / emojisums.swift
Created April 28, 2016 13:02
Emoji Sums
struct Emoji {
var character: String
}
let emojiSums = [
"😐": ["😊", "😒"],
"😀": ["😊", "😊"],
"😭": ["😒", "😒"],
"🍖": ["🐔", "🔥"]
].map({(sum: $0, parts: $1.sorted())})
string public standard = 'CryptoPunks';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
@craigomac
craigomac / flutter_widget.dart
Last active June 3, 2019 19:25
Flutter Widget
Padding(
child: Row(
children: <Widget>[
Text(user.name)
],
))
class AssetsPrepareLevelsAction { }
class AssetMiddleware implements MiddlewareClass<AppState> {
final String pathToAssets;
AssetMiddleware(this.pathToAssets);
@override
Future call(Store<AppState> store, action, NextDispatcher next) async {
class Asset {
final String assetPath;
final String filename;
Asset(this.assetPath, this.filename);
Future<String> prepare() async {
Directory directory = await getApplicationDocumentsDirectory();
String path = join(directory.path, filename);
void main() {
final store = new Store<AppState>(
AppStateReducer(),
initialState: AppState.initial(),
middleware: [
AssetMiddleware("assets"),
AudioMiddleware(),
]);
runApp(new App(