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
{ | |
"origin": "dartlab.org", | |
"url": "http://dartlab.org/#:gistId", | |
"history": [ | |
"1dec995218ffb0e27cd2" | |
] | |
} |
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 FirstError { } | |
class SecondError { } | |
Future<void> someApi() { | |
return Future(() { | |
throw FirstError(); | |
}).catchError((error, stackTrace) { | |
print("inner: $error"); | |
// although `throw SecondError()` has the same effect. | |
return Future.error(SecondError()); |
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
# https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6sbix.html | |
# requires fonttools lib (`pip install fonttools>=4.7.0`) | |
import sys | |
from fontTools.ttLib import TTFont | |
font = TTFont(sys.argv[1]) | |
sbix = font["sbix"] | |
max_ppem = max(sbix.strikes.keys()) | |
strike = sbix.strikes[max_ppem] |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Vim Cheat Sheet</title> | |
<link rel="stylesheet" href="styles.css"> | |
<script type="application/dart" src="main.dart"></script> | |
</head> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Sunflower</title> | |
<link rel="stylesheet" href="styles.css"> | |
<script type="application/dart" src="main.dart"></script> | |
</head> |
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
/********************************************************* | |
Read and display Amiga fonts on Windows and Linux | |
Copyright © 2022 Mark Craig | |
https://www.youtube.com/MrMcSoftware | |
**********************************************************/ | |
/* NOTES: | |
* | |
* For Windows, if you need to include windows.h or wtypes.h, be careful about |