Skip to content

Instantly share code, notes, and snippets.

@ailabs-software
ailabs-software / gist:0ff6f78239941d0b40f3712ffaec3339
Created March 27, 2020 17:39
dart2js: cast error that occurs in -03 level but not -O2 level
mainEntryPoint_ShopwindowClient_client.dart.js?v=1585325826512:467 Uncaught CastError: Instance of 'minified:D8': type 'minified:D8' is not a subtype of type 'minified:L4'
at Object.x (https://george.shopwindow.io/dg5_platform/static/build/mainEntryPoint_ShopwindowClient_client.dart.js?v=1585325826512:467:3)
at Object.X (https://george.shopwindow.io/dg5_platform/static/build/mainEntryPoint_ShopwindowClient_client.dart.js?v=1585325826512:787:48)
at de.h (https://george.shopwindow.io/dg5_platform/static/build/mainEntryPoint_ShopwindowClient_client.dart.js?v=1585325826512:18007:26)
at de.cT (https://george.shopwindow.io/dg5_platform/static/build/mainEntryPoint_ShopwindowClient_client.dart.js?v=1585325826512:19564:30)
at cA.R (https://george.shopwindow.io/dg5_platform/static/build/mainEntryPoint_ShopwindowClient_client.dart.js?v=1585325826512:18182:16)
at Object.ay (https://george.shopwindow.io/dg5_platform/static/build/mainEntryPoint_ShopwindowClient_client.dart.js?v=1585325826512:1924:17
@ailabs-software
ailabs-software / gist:653c984dcf1e11bd299ad5822d080b88
Created February 15, 2020 05:42
Email headers with strange message id for a SendGrid account
Delivered-To: [email protected]
Received: by 2002:aca:3f42:0:0:0:0:0 with SMTP id m63csp5511551oia;
Tue, 4 Feb 2020 04:34:47 -0800 (PST)
X-Google-Smtp-Source: APXvYqx/M/oIS1NrHI6d4tyiSHdkOUu0yLZ9PHholrWuDAVpKY6dGUI5mjhoLyeqjaZ386Mro25l
X-Received: by 2002:aa7:da18:: with SMTP id r24mr16852436eds.111.1580819687321;
Tue, 04 Feb 2020 04:34:47 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1580819687; cv=none;
d=google.com; s=arc-20160816;
b=Nc9abO0q48GcYjm+XPYdSCJ4kNvAZ/ozALV6UORnUqSbawPaO+39t2RaohfI+dQ/G9
u7mOkPr0RTboK00gjrMCEtXSJHTvQKjrPUuGA+hocU0u2lK223Vsoo/td24o9gdHJ7db
Delivered-To: [email protected]
Received: by 2002:a1c:1f09:0:0:0:0:0 with SMTP id f9csp1365887wmf;
Thu, 13 Feb 2020 18:55:28 -0800 (PST)
X-Google-Smtp-Source: APXvYqyhQsnOGjqOHVJ+rJ8OBfQ10/mv7n3bKwd+UwbgjOclmiQ9I5W/3+gEmucyRD2mJ7YjbiW8
X-Received: by 2002:a17:906:14d5:: with SMTP id y21mr764742ejc.212.1581648928149;
Thu, 13 Feb 2020 18:55:28 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1581648928; cv=none;
d=google.com; s=arc-20160816;
b=ZMIheuZEdaxz8f4Ypney3NukZqP6M4ividFRlO69FmKleyf1oUjSNZUIw37rY5HndU
ZvppCj2hLGDcQ0rawBJX4uGrt+jSEJkDhKCkpoCVHvjqYl0Pjyf26Y4REKuTGzaAMYKM
@ailabs-software
ailabs-software / new_default_card.html
Created January 11, 2020 02:14
Example of real Tiny Template template that is a content card
<div class="default_content_card">
<div class="content">
<div class="main_content">
<div class="card_hero_img_container">
<component name="image" src=item.dataCardModel["featured_image"]></component>
</div>
</div>
<div class="sub_content">
<div class="content_card_body">
<h2 class="content_card_heading">{{item.dataCardModel["title"]}}</h2>
@ailabs-software
ailabs-software / gist:3badafc6ed8e9e83bc99085a2406657b
Created January 10, 2020 16:47
Not outputting "build/*.js" files from "pub run build_runner build web"
root@shopwindow-ThinkPad-T460:/opt/deployment/applications/shopwindow/shopwindow_dg5# pub run build_runner build web
[INFO] Generating build script completed, took 421ms
[INFO] Reading cached asset graph completed, took 741ms
[INFO] Checking for updates since last build completed, took 1.4s
[INFO] Running build completed, took 2m 19s
[INFO] Caching finalized dependency graph completed, took 1.1s
[INFO] Succeeded after 2m 20s with 8049 outputs (14464 actions)
root@shopwindow-ThinkPad-T460:/opt/deployment/applications/shopwindow/shopwindow_dg5# ls build
packages
root@shopwindow-ThinkPad-T460:/opt/deployment/applications/shopwindow/shopwindow_dg5#
@ailabs-software
ailabs-software / gist:22676b0bf6ed973fa6c201bee9a7148f
Created January 10, 2020 16:42
Dart watch error from "webdev build"
[SEVERE]
[SEVERE]
[SEVERE] You have hit a bug in build_runner
[SEVERE] Please file an issue with reproduction steps at https://github.com/dart-lang/build/issues
[SEVERE]
[SEVERE]
[SEVERE] FileSystemException: Failed to watch path, path = '/opt/deployment/applications/shopwindow/shopwindow_dg5/dist/ShopwindowClient-client-ASSETSOUT/assets/ailabs/jmultitenant/assets' (OS Error: No space left on device, errno = 28)
[SEVERE] dart:isolate _RawReceivePortImpl._handleMessage
[SEVERE]
@ailabs-software
ailabs-software / useful_card.html
Last active January 9, 2020 16:04
Example of card HTML using Jael template syntax
<div class="default_content_card">
<div class="content">
<div class="main_content">
<div class="card_hero_img_container">
<img class="card_hero_img" src="{{picture_url}}" alt="">
</div>
</div>
<div class="sub_content">
<div class="content_card_body">
<h2 class="content_card_heading">{{heading}}</h2>
@ailabs-software
ailabs-software / main.dart
Created December 18, 2019 19:39
Extension method on dynamic
extension on dynamic {
bool get stringNotEmpty => this is String && this.isNotEmpty;
}
void main()
{
Object foo = new Object();
print( foo.stringNotEmpty );
@ailabs-software
ailabs-software / app.js
Created December 8, 2019 23:49
How to create a person and set fields & email on the new person
var https = require("https");
function callBandWindowAPI( requestOptions, data ) {
return new Promise((resolve, reject) => {
var postReq = https.request(
requestOptions,
function(response) { // console.log('\n\nin fun...', response);
const { statusCode } = response;
if (statusCode >= 300) {
reject(
@ailabs-software
ailabs-software / app.js
Created December 8, 2019 22:43
Use Bandwindow API from Node.js: JSON POST
var https = require("https");
function callBandWindowAPI( requestOptions, data ) {
return new Promise((resolve, reject) => {
var postReq = https.request(
requestOptions,
function(response) { // console.log('\n\nin fun...', response);
const { statusCode } = response;
if (statusCode >= 300) {
reject(