A service for Angel that uses package:mailer
to send e-mails.
It also supports rendering templates (Jael, mustache, whatever), which makes developing email templates easier.
In addition, if given an assetsDir
, it will inline CSS stylesheets (use cacheAssets: true
in production).
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
abstract class Monad<T> { | |
abstract MonadInstance<U> bind<U>(FutureOr<Monad<U>> Function(T) f); | |
abstract MonadInstance<T> wrap(T value); | |
} | |
abstract class EitherMonad<L, R> extends Monad<Either<L, R>> { | |
static EitherMonad<L, Exception> wrapTryCatch<L>(FutureOr<L> Function() f); | |
abstract EitherMonad<U, R> bindLeft(FutureOr<U> Function(L) f); | |
abstract EitherMonad<L, U> bindRight(FutureOr<U> Function(R) f); |
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
import <http> | |
func WrapNum(value) -> { value } | |
timesTwo = .value * 2 | |
print(timesTwo(WrapNum(2)).value) | |
srv = HttpServer(ctx { | |
{req, res} = ctx |
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
# create table users | |
schema users = | |
{ | |
id: serial; | |
name: string; | |
age: int; | |
} | |
# select * from users | |
users |
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
(defclass MyWidget (StatelessWidget) | |
(defun build (ctx) | |
(Column | |
(AppBar | |
:title (Text "Hello, Disp!") | |
:actions (list | |
(Text "A") | |
(Padding | |
:padding (EdgeInsets.all 16) | |
:child (Text "B")))) |
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
alert() |
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
/* | |
* I'm sure there's a better way to do this, but this solution works for me. | |
* Recursively copies a directory + subdirectories into a target directory. | |
* There's also no error handling. Have fun. | |
*/ | |
import 'dart:io'; | |
import 'package:path/path.dart' as path; | |
Future<void> copyDirectory(Directory source, Directory destination) async { |
I'm a 20-yr-old polyglot programmer who's been coding since the age of 7. I believe in free, equitable access to information, and giving back to the community.
Personal site: https://thosakwe.com
NewerOlder