This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.3' | |
services: | |
db: | |
image: mysql:5.7 | |
volumes: | |
- db_data:/var/lib/mysql | |
environment: | |
- MYSQL_ROOT_PASSWORD=presta | |
- MYSQL_DATABASE=presta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run this in the F12 javascript console in chrome | |
// if a redirect happens, the page will pause | |
// this helps because chrome's network tab's | |
// "preserve log" seems to technically preserve the log | |
// but you can't actually LOOK at it... | |
// also the "replay xhr" feature does not work after reload | |
// even if you "preserve log". | |
window.addEventListener("beforeunload", function() { debugger; }, false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sources: | |
# https://blog.usejournal.com/automate-react-native-builds-with-github-actions-af54212d26dc | |
# https://zach.codes/ios-builds-using-github-actions-without-fastlane/ | |
# https://stackoverflow.com/questions/16550594/jenkins-xcode-build-works-codesign-fails/19550453#19550453 | |
# https://www.valueof.io/blog/deploying-to-google-play-using-github-actions | |
name: Build and Publish Test Builds | |
on: | |
push: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI/CD workflow | |
on: push | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Unpivot a pivot table of any size. | |
* | |
* @param {A1:D30} data The pivot table. | |
* @param {1} fixColumns Number of columns, after which pivoted values begin. Default 1. | |
* @param {1} fixRows Number of rows (1 or 2), after which pivoted values begin. Default 1. | |
* @param {"city"} titlePivot The title of horizontal pivot values. Default "column". | |
* @param {"distance"[,...]} titleValue The title of pivot table values. Default "value". | |
* @return The unpivoted table | |
* @customfunction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vite.config.ts | |
src/vite-env.d.ts | |
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useMemo } from "react"; | |
import { useSearchParams } from "react-router-dom"; | |
type ParseConfig = Record< | |
string, | |
| { type: "string"; defaultValue?: string } | |
| { type: "number"; defaultValue?: number } | |
| { parse: (value: URLSearchParams) => unknown } | |
>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Hono } from 'hono' | |
import { streamText } from 'hono/streaming' | |
import { Ai } from '@cloudflare/ai' | |
import { events } from 'fetch-event-stream' | |
type Bindings = { | |
AI: any | |
} | |
const app = new Hono<{ Bindings: Bindings }>() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-console */ | |
/*** | |
* This is a little server that emulates the protocol used by cloudflare's browser rendering API. In | |
* local development, you can run this server, and connect to it instead of cloudflare's (strictly | |
* limited) API. e.g. in your worker you might use a function like this: | |
* | |
* ```ts | |
* import { Browser, launch as launchPuppeteer } from '@cloudflare/puppeteer' | |
* function launchBrowser(env: Environment) { | |
* if (env.LOCAL_BROWSER_ORIGIN) { |
OlderNewer