Skip to content

Instantly share code, notes, and snippets.

@gigor
gigor / logs.js
Last active October 26, 2024 07:33
Umami Analytics Wrapper
import { browser } from '$app/environment';
import { isProd } from '$lib/stores/globals';
let isInstalled = false;
let triedToInstall = false;
const params_of_interest = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'ref', 'z'];
const umami_website_id = 'YOUR_WEBSITE_ID';
const umami_url = `https://YOUR_DOMAIN/script.js`;
@gigor
gigor / run-ios.sh
Last active May 11, 2023 06:50
This script builds your Capacitor project and launches on your connected iOS device
#!/bin/bash
# Set path to your XCODE Workspace
IOS_WORKSPACE="ios/App/App.xcworkspace"
# Set your device UDID
DEVICE_UDID="XXXXXXXX-YYYYYYYYYYYYYYYY"
# Build the Svelte app and copy assets to the iOS platform
npm run build && npx cap copy ios