Skip to content

Instantly share code, notes, and snippets.

View notmarkmiranda's full-sized avatar
🏠
Working from home

Mark Miranda notmarkmiranda

🏠
Working from home
  • Smartsheet
  • Longmont, CO
View GitHub Profile
@brianegan
brianegan / undo_change_notifier.dart
Created March 5, 2020 12:28
Undo/Redo with ChangeNotifier
import 'package:flutter/cupertino.dart';
class UndoChangeNotifier<T> extends ChangeNotifier {
final List<T> _history;
int _historyIndex = -1;
UndoChangeNotifier(T initialState) : _history = [initialState];
T get state => hasState ? _history[_historyIndex] : null;
@lsaville
lsaville / README.md
Last active September 8, 2019 04:47

Quick laptop breakdown

Here's a comparison of the System76 Darter Pro 15" and the fanciest new Dell XPS 7390 13"

The Darter Pro

darter pro breakdown

$1507 with the add-ons of 16gb RAM, i7 processor, 3-year warranty, and 3-day rush assembly

@awesome
awesome / strip HTML tags
Created November 3, 2009 16:29
ruby strip HTML tags
# copied from (thanks!): http://codesnippets.joyent.com/posts/show/615
str = <<HTML_TEXT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>
<h1>Application error</h1>
<p>Change this error message for exceptions thrown outside of an action (like
in Dispatcher setups or broken Ruby code) in public/500.html</p>