Skip to content

Instantly share code, notes, and snippets.

View malloy045's full-sized avatar

Dave Malloy malloy045

  • Pennsylvania, USA
View GitHub Profile
@malloy045
malloy045 / README.md
Last active April 3, 2020 12:24
Interesting Gists - C#, Angular, Dart/Flutter

Overview

This is a list of interesting code snippets that I've created when dabbling in C#, Angular, and most recently Dart/Flutter.

C#

  • Sempahore - The same user data was "refreshed" when mobile users used a certain feature in our mobile app AND when administrators used a certain feature on their dashboard. This caused a race condition which resulted in duplicate entries in our database. This was one approach to stop the bleeding.
  • MVC and API routing (one web project) - A requirement of this project was to only use one web project. It was part of a suite containing a mobile app and an angular administrative portal. I was on the fence with this decision - since separating the Angular front end (hosted via the MVC controllers) and the API would lend itself nicely to scaling the API if mobile usage increased. But this was part of a monolith and the overhead
@malloy045
malloy045 / login.dart
Created April 12, 2019 12:55
flutter_webview_plugin basic example
import 'package:flutter/material.dart';
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
class Login extends StatefulWidget {
Login({Key key}) : super(key: key);
@override
_MyLoginPageState createState() => _MyLoginPageState();
}