Skip to content

Instantly share code, notes, and snippets.

View blasten's full-sized avatar

Emmanuel Garcia blasten

  • c.ai
  • Palo Alto, CA
View GitHub Profile
# OAPI Specification for the annotation tool service
openapi: 3.0.0
info:
title: Annotation Service
version: 1.0.0
paths:
/tasks/{taskId}:
get:
summary: Get information about a task
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<hierarchy rotation="0">
<node index="0" text="" resource-id="" class="android.widget.FrameLayout" package="io.flutter.plugins.webviewflutterexample" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][1080,2236]">
<node index="0" text="" resource-id="" class="android.widget.LinearLayout" package="io.flutter.plugins.webviewflutterexample" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][1080,2236]">
<node index="0" text="" resource-id="android:id/content" class="android.widget.FrameLayout" package="io.flutter.plugins.webviewflutterexample" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" fo
@blasten
blasten / bisect-flutter-sdk.md
Last active January 13, 2022 21:08
Bisect the Flutter SDK

Bisect the Flutter SDK

  1. Start
cd <flutter-sdk-install-location>
git bisect start
  1. Ensure you can reproduce the issue at this point.
1c1
< P d 43608 51116 5282752 <TOTAL>
---
> P d 43606 51114 5282644 <TOTAL>
62098,62099c62098,62099
< P d 2672 2821 344704 io
< P d 2672 2821 344704 io.flutter
---
> P d 2670 2819 344596 io
> P d 2670 2819 344596 io.flutter
@blasten
blasten / build.gradle
Last active July 8, 2022 15:34
Add lifecycle dependency in build.gradle
afterEvaluate {
def containsEmbeddingDependencies = false
for (def configuration : configurations.all) {
for (def dependency : configuration.dependencies) {
if (dependency.group == 'io.flutter' &&
dependency.name.startsWith('flutter_embedding') &&
dependency.isTransitive())
{
containsEmbeddingDependencies = true
break
function throttle(task, ms, context) {
let started = false;
let lastCall = -Infinity;
let taskScheduled = false;
let lastArguments = [];
return function() {
if (!started) {
started = true;
lastCall = Date.now();
function parse(pattern, query) {
const patternWords = pattern.split(' ');
const queryWords = query.split(' ');
const sol = {};
if (!match(patternWords, 0, queryWords, 0, sol)) {
return null;
}
return sol;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<style>
!(function(t, i) {
"object" == typeof exports && "undefined" != typeof module
? (module.exports = i())
: "function" == typeof define && define.amd ? define(i) : (t.Layout = i());
})(this, function() {
"use strict";
function t(t, i, n) {
let e = S;
if (n) {
X.length = 0;
@blasten
blasten / diff.js
Last active August 23, 2017 01:35
Minimalistic tree diffing algorithm
export const OptCode = {
ADD_NODE: 1,
SET_PROPERTY: 2,
SET_TEXT: 3,
REMOVE_PROPERTY: 4,
REMOVE_NODE: 5
};
// a = new
// b = old