Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
🌚

AV av

💻
🌚
View GitHub Profile
@av
av / lisp.dart
Created Aug 29, 2020
Example of running LISP in Dart
View lisp.dart
void main() {
// LISP Scope could be populated with reuqired values
// to provide interop between Dart and LISP
final baseScope = LispScope({
'*': Multiplication('*'),
'+': Addition('+'),
'offset': OffsetContainer('offset'),
'print': Print('print'),
'call': CallMethod('call'),
});
@av
av / level.txt
Created Aug 28, 2020
Sample level MLLS
View level.txt
~~>Meta
## Cheesy onions
@@ 240 Wettotter Harbor, 53320
Local food supplier needs help unlocking a warehouse.
~~>Dialog
hello|Warehouse owner| Hey, you're here... You gotta help me! You gotta help me quick! 🙏
what|You| Any rush?
--
what|Warehouse owner| Actually... Yes. That boy did not get his raise... By... An occasion.
@av
av / examples.md
Created Aug 27, 2020
thng-query examples
View examples.md

Sample queries

thngs with name Advanced* where identifiers.ser^673
products named Robot*
thngs tagged "offline"
products where customFields.weight > 42

Programmatic use

@av
av / Component.js
Created Aug 26, 2020
Root Component class from an unreleased UI framework
View Component.js
var HIDE_CLASS = 'ui-hidden';
var DISABLED_CLASS = 'ui-disabled';
var FOCUSABLE_GRABBER = ':tabbable:visible:first';
ui.component = ui.define({
id: null,
cls: null,
locator: null,
hidden: false,
@av
av / main.dart
Created Jan 13, 2020
Flutter: neu
View main.dart
import 'package:flutter/material.dart';
void main() => runApp(NeumorphicApp());
class NeumorphicApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Neumorphic App',
theme: ThemeData(
@av
av / main.dart
Created Jan 13, 2020
Flutter: neu
View main.dart
// Before
child: Container(
//...
// After
// ...
child: AnimatedContainer(
duration: const Duration(milliseconds: 150),
// ...
@av
av / main.dart
Created Jan 13, 2020
Flutter: neu
View main.dart
// In _NeumorphicContainerState.build > Listener > Container > BoxDecoration
// ...
colors: [
_isPressed ? color : color.mix(Colors.black, .1),
_isPressed ? color.mix(Colors.black, .05) : color,
_isPressed ? color.mix(Colors.black, .05) : color,
color.mix(Colors.white, _isPressed ? .2 : .5),
],
// ...
@av
av / main.dart
Created Jan 13, 2020
Flutter: neu
View main.dart
// In _NeumorphicContainerState.build > Listener > Container > BoxDecoration
// ...
color: color.mix(Colors.black, .05),
// ...
@av
av / main.dart
Last active Jan 13, 2020
Flutter: neu
View main.dart
// In _NeumorphicContainerState.build > Listener > Container > BoxDecoration
boxShadow: _isPressed ? null : [...]
// ...
@av
av / main.dart
Created Jan 13, 2020
Flutter: neu
View main.dart
// Converting NeumorphicContainer to a StatefulWidget
class NeumorphicContainer extends StatefulWidget {
final Widget child;
final double bevel;
final Offset blurOffset;
final Color color;
NeumorphicContainer({
Key key,
this.child,
You can’t perform that action at this time.