These are the instructions for getting the debugger.html project to connect to and debug Safari on various platforms.
Requirements
- Xcode
- Download and install Xcode from Apple
| case | |
| when host like '%cluster-%.rds.amazonaws.com%' then 'Aurora' | |
| when host like '%rds.amazonaws.com%' then 'RDS' | |
| when host like 'ec2%' then 'EC2 Self-Hosted' | |
| when host like '%supabase.co%' then 'Supabase' -- db.project.supabase.co & region.supabase.com | |
| when host like '%timescale.com%' then 'Timescale' | |
| when host like '%postgres.vercel-storage.com%' then 'Vercel Postgres' | |
| when host like '%azure.neon.tech%' then 'Neon (Azure)' | |
| when host like '%aws.neon.tech%' then 'Neon (AWS)' | |
| when host like '%.turso.io%' then 'Turso' |
| name: PR Review | |
| on: | |
| # Run this workflow on every PR event. Existing review apps will be updated when the PR is updated. | |
| # Neon branches are created and removed according to PR updates | |
| pull_request: | |
| types: [opened, reopened, synchronize, closed] | |
| jobs: | |
| pr-preview: | |
| runs-on: ubuntu-latest |
| -- get existing index names and SQL definitions | |
| SELECT indexname, indexdef | |
| FROM pg_indexes | |
| WHERE schemaname = 'public' AND tablename = 'table' | |
| ORDER BY indexname; | |
| -- create new tmp index (example) | |
| CREATE INDEX tmp_name_of_the_index ON public.table USING btree (time ASC); | |
| -- drop existing index | |
| DROP INDEX name_of_the_index; |
| -- bring all examples together and clean up with some top level variables | |
| WITH vars AS ( | |
| SELECT INTERVAL '1 day' AS bucket, | |
| (now() - INTERVAL '3 months') as time_from, | |
| (now() + INTERVAL '1 month') as time_to | |
| ) | |
| -- generate timeline into the past and future | |
| , | |
| timeline AS ( |
| class ActionsHypertable < ActiveRecord::Migration[7.0] | |
| def change | |
| @table_name = 'actions' | |
| @time_column = 'created_at' | |
| reversible do |dir| | |
| dir.up do | |
| execute <<-SQL | |
| SELECT create_hypertable('#{@table_name}', '#{@time_column}', if_not_exists => TRUE, migrate_data => TRUE); | |
| SQL | |
| end |
| SELECT s.schemaname, | |
| s.relname AS tablename, | |
| s.indexrelname AS indexname, | |
| pg_size_pretty(pg_relation_size(s.indexrelid)) AS index_size | |
| FROM pg_catalog.pg_stat_user_indexes s | |
| JOIN pg_catalog.pg_index i ON s.indexrelid = i.indexrelid | |
| WHERE s.idx_scan = 0 -- has never been scanned | |
| AND 0 <>ALL (i.indkey) -- no index column is an expression | |
| AND NOT i.indisunique -- is not a UNIQUE index | |
| AND NOT EXISTS -- does not enforce a constraint |
| <script> | |
| { | |
| let a = "foo"; | |
| } | |
| { | |
| let b = 42; // set breakpoint here: debugger shows b == "foo"! | |
| } | |
| </script> |
| const timing = store => next => action => { | |
| performance.mark(`${action.type}_start`); | |
| let result = next(action); | |
| performance.mark(`${action.type}_end`); | |
| performance.measure( | |
| `${action.type}`, | |
| `${action.type}_start`, | |
| `${action.type}_end` | |
| ); | |
| return result; |
These are the instructions for getting the debugger.html project to connect to and debug Safari on various platforms.
Requirements
| // edit these values | |
| const API_KEY_ID = "9352fd37f2f4ce923932c9c6328829a5be7093ea3d"; | |
| const QUERY_ID = 1002; | |
| const YOUR_REDASH = "https://your.redash.io/api/queries/"; | |
| // leave this | |
| const API_KEY = `?api_key=${API_KEY_ID}`; | |
| const RESULT_URL = `${YOUR_REDASH}${QUERY_ID}/results.csv${API_KEY}`; | |
| d3.csv(RESULT_URL, function(data) { |