Skip to content

Instantly share code, notes, and snippets.

import { client } from "@/trigger"
import { eventTrigger, isTriggerError } from "@trigger.dev/sdk"
import { OpenAI } from "@trigger.dev/openai"
import { Supabase } from "@trigger.dev/supabase"
import { z } from "zod"
import _ from "lodash"
import { write } from "@/lib/neo4j"
FROM sitespeedio/node:ubuntu-22.04-nodejs-18.12.1 AS pruner
RUN apt-get update && apt-get install -y openssl
WORKDIR /app
RUN npm install turbo -g
COPY . .
RUN turbo prune --scope=webapp --docker
RUN find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
# Base strategy to have layer caching
FROM sitespeedio/node:ubuntu-22.04-nodejs-18.12.1 AS base
{
"method": "POST",
"uri": "https://api.airtable.com/...",
"headers": {
"content-type": "application/json"
}
}
type TabProps = {
defaultActiveKey: string;
className?: string;
children: ReactNode;
};
type TabContentProps = {
eventKey: string;
children: ReactNode;
title: string;
@ericallam
ericallam / DOC.md
Created September 2, 2020 10:26
TextureFromFile leak post-mortem

TextureFromFile leak post-mortem

Usages of TextureFromFile in the game to load an image from StreamingAssets could lead to a memory leak of the loaded texture in the case of the TextureFromFile instance being cancelled before it finished.

This would happen in the case of the saga map collection view object reuse (e.g. SagaMapPlayStoryPolaroid) where a view object would be loaded and an initial TextureFromFile instance would get created, and then in the same frame that view object would be recycled and reused for a different section of the map, causing that original TextureFromFile instance to be cancelled.

The TextureFromFile.Cancel method looked like this:

public void Cancel()
@ericallam
ericallam / leak1.cs
Created September 2, 2020 10:00
UnityWebRequest DownloadTexture leak
using System;
using System.Collections.Generic;
using MEC;
using RSG;
using UnityEngine;
using UnityEngine.Networking;
// This is the original implementation
namespace DefaultNamespace
@ericallam
ericallam / keybase.md
Created September 1, 2019 21:01
keybase.md

Keybase proof

I hereby claim:

  • I am ericallam on github.
  • I am eallam (https://keybase.io/eallam) on keybase.
  • I have a public key ASBmNg1iFy8fqoyVlxPpWUjlx_FQi7wvtp0phG5or9ijhAo

To claim this, I am signing this object:

2019-03-19 11:45:41 Using SAM Template at /Users/eric/code/Solve/opensource/ship-logs-to-honeycomb/template.yml
2019-03-19 11:45:41 Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane
2019-03-19 11:45:41 Changing event name from before-call.apigateway to before-call.api-gateway
2019-03-19 11:45:41 Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict
2019-03-19 11:45:41 Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration
2019-03-19 11:45:41 Changing event name from before-parameter-build.route53 to before-parameter-build.route-53
2019-03-19 11:45:41 Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search
2019-03-19 11:45:41 Changing event name from docs.*.autoscaling.CreateLaunchConfiguration.complete-section to docs.*.auto-scaling.CreateLaunchConfiguration.com
@ericallam
ericallam / schema.md
Created January 23, 2019 10:07
Example Schema
@ericallam
ericallam / AssemblyCompilationReporter.cs
Created April 10, 2018 10:43
Unity - Log Assembly Compilation times
namespace Editor {
public class AssemblyCompilationReporter {
[InitializeOnLoadMethod]
private static void Init() {
CompilationPipeline.assemblyCompilationStarted += CompilationPipelineOnAssemblyCompilationStarted;
CompilationPipeline.assemblyCompilationFinished += CompilationPipelineOnAssemblyCompilationFinished;
}
private static void CompilationPipelineOnAssemblyCompilationFinished(string s, CompilerMessage[] compilerMessages) {