Skip to content

Instantly share code, notes, and snippets.

View av's full-sized avatar
💻
🌚

Ivan Charapanau av

💻
🌚
View GitHub Profile
@av
av / bundle.js
Last active August 8, 2021 18:58
Custom Widget Bundle
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({
@av
av / lisp.dart
Created August 29, 2020 08:38
Example of running LISP in 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 August 28, 2020 19:29
Sample level MLLS
~~>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 August 27, 2020 09:29
thng-query examples

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 August 26, 2020 09:24
Root Component class from an unreleased UI framework
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 January 13, 2020 18:44
Flutter: neu
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 January 13, 2020 18:40
Flutter: neu
// Before
child: Container(
//...
// After
// ...
child: AnimatedContainer(
duration: const Duration(milliseconds: 150),
// ...
@av
av / main.dart
Created January 13, 2020 18:38
Flutter: neu
// 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 January 13, 2020 18:27
Flutter: neu
// In _NeumorphicContainerState.build > Listener > Container > BoxDecoration
// ...
color: color.mix(Colors.black, .05),
// ...
@av
av / main.dart
Last active January 13, 2020 18:33
Flutter: neu
// In _NeumorphicContainerState.build > Listener > Container > BoxDecoration
boxShadow: _isPressed ? null : [...]
// ...