Skip to content

Instantly share code, notes, and snippets.

View timfish's full-sized avatar

Tim Fish timfish

  • Freelance
  • 00:36 (UTC +02:00)
View GitHub Profile
@pesterhazy
pesterhazy / indexeddb-problems.md
Last active April 19, 2024 02:40
The pain and anguish of using IndexedDB: problems, bugs and oddities

This gist lists challenges you run into when building offline-first applications based on IndexedDB, including open-source libraries like Firebase, pouchdb and AWS amplify (more).

Note that some of the following issues affect only Safari. Out of the major browsers, Chrome's IndexedDB implementation is the best.

Backing file on disk (WAL file) keeps growing (Safari)

When this bug occurs, every time you use the indexeddb, the WAL file grows. Garbage collection doesn't seem to be working, so after a while, you end up with gigabytes of data.

Random exceptions when working with a large number of indexeddb databases (Safari)

@vdudouyt
vdudouyt / client.c
Last active February 28, 2021 14:21
USB bulk device example with libopencm3 & libusb-1.0
#include <libusb.h>
#include <assert.h>
#include <stdio.h>
#include <string.h>
int main()
{
libusb_init(NULL);
libusb_device_handle *handle;
assert(handle = libusb_open_device_with_vid_pid(NULL, 0x0483, 0x5740));
@kevinmehall
kevinmehall / node-gyp-cross.sh
Created January 30, 2015 21:15
node-gyp cross-compile
#!/bin/bash
set -e
if [ ! -d "$STAGING_DIR" ]; then
echo "STAGING_DIR needs to be set to your cross toolchain path";
exit 1
fi
ARCH=${ARCH:-mipsel}
NODE=${NODE:-0.10.33}