Skip to content

Instantly share code, notes, and snippets.

View johtso's full-sized avatar
🤖

Johannes johtso

🤖
View GitHub Profile
@johtso
johtso / index.ts
Created February 24, 2023 15:04 — forked from huw/README.md
Remix, Sentry & Cloudflare Workers
import * as build from "@remix-run/dev/server-build";
import { createRoutes } from "@remix-run/server-runtime/dist/routes";
import { Dedupe, ExtraErrorData, Transaction } from "@sentry/integrations";
import { hasTracingEnabled } from "@sentry/tracing";
import { Toucan } from "toucan-js";
import createEventHandler from "./createEventHandler";
import instrumentBuild, { getTransactionName, startRequestHandlerTransaction } from "./instrumentBuild";
interface Environment {
__STATIC_CONTENT: KVNamespace<string>;
@johtso
johtso / jQueryBookmarklet.coffee
Created July 7, 2011 21:33
Load jQuery/jQuery UI dependencies
loadDependencies = (callback) ->
requirements = {jq: '1.6.1', jqui: '1.8.7'}
getScript = (url, next) ->
script = document.createElement('script')
script.src = url
head = document.documentElement.childNodes[0]
script.onload = script.onreadystatechange = onScriptLoad script, next
head.appendChild script