Skip to content

Instantly share code, notes, and snippets.

View nikita-starostin's full-sized avatar

Nikita Starostin nikita-starostin

View GitHub Profile
@MoOx
MoOx / isDblTouchTap.js
Last active April 30, 2023 19:28
Double touch tap workaround for React based on onTouchTap (react-tap-event-plugin)
const dblTouchTapMaxDelay = 300
let latestTouchTap = {
time: 0,
target: null,
}
export default function isDblTouchTap(event) {
const touchTap = {
time: new Date().getTime(),
target: event.currentTarget,
@flopex
flopex / gist:8ba626b2dc650947882d3f45769c4702
Last active July 24, 2025 21:11
Cloudflare D1 through drizzle-orm without the need/use of Cloudflare Worker binding
// index.ts

import { sql } from 'drizzle-orm';
import { drizzle } from 'drizzle-orm/sqlite-proxy';
import type { AsyncRemoteCallback } from 'drizzle-orm/sqlite-proxy';
import { d1HttpDriver } from './d1-http-driver';
import * as schema from './schema';

const wrappedDriver: AsyncRemoteCallback = async (sql: string, params: unknown[], method: "all" | "run" | "get" | "values") => {