flowchart TD
Mac((MacBook Pro)) -->|USB-C/Thunderbolt| Dock(Thunderbolt Dock)
PC((Windows PC)) -->|DP| Monitor
Dock -->|HDMI/DP| Monitor
Backup(Backup drive) -->|USB| Dock
Net(Network Switch) -->|Cat7| Dock
Net -->|Cat7| PC
/** | |
* Why? | |
* | |
* Pressable is the newer and superior component in React Native for buttons. | |
* It has a built in affordance for near-misses and, most importantly, it | |
* doesn't respond or show an animation while the user is dragging. | |
* | |
* However, Pressable doesn't have any feedback, like TouchableOpacity. This | |
* simple component adds the animation you want *when* the user is actually | |
* committed a press. This is how, for example, the official Facebook app works. |
// Configure Sentry performance tracing because the default Postgres integration doesn't work with Knex: | |
// https://github.com/getsentry/sentry-javascript/blob/main/packages/tracing-internal/src/node/integrations/postgres.ts | |
const sentrySpans = new Map<string, Span>() | |
db.on("query", (query: any) => { | |
const span = Sentry.getActiveSpan()?.startChild({ | |
op: "db.query", | |
description: query.sql, | |
}) | |
if (span) sentrySpans.set(query.__knexQueryUid, span) | |
}) |
/*global fetch*/ | |
import { S3Client, GetObjectCommand } from '@aws-sdk/client-s3' | |
const s3 = new S3Client({ region: 'us-east-2' }) | |
export const handler = async (event, context) => { | |
// console.log('Received event:', JSON.stringify(event, null, 2)) | |
const bucket = event.Records[0].s3.bucket.name |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": [ | |
"athena:StartQueryExecution", | |
"athena:ListDataCatalogs", | |
"glue:GetTableVersions", |
/*global fetch*/ | |
import { PutObjectCommand, S3Client } from "@aws-sdk/client-s3"; | |
const client = new S3Client({}); | |
export const handler = async (event) => { | |
const projectId = process.env.SANITY_PROJECT_ID | |
const dataset = process.env.SANITY_DATASET | |
const token = process.env.SANITY_TOKEN |
import { Knex } from "knex" | |
export async function seed(knex: Knex): Promise<void> { | |
// Delete order is specific because of foreign key references | |
await knex.delete().from("...") | |
await knex("users").insert(TestUsers) | |
... | |
await knex.raw("refresh materialized view ...") |
#!/usr/bin/env bash | |
set -eo pipefail | |
srcdir="$1" | |
if [ -z "$srcdir" ]; then | |
echo "usage: $0 <dir>" | |
exit 1 | |
fi |
#!/usr/bin/env bash | |
# Required parameters: | |
# @raycast.schemaVersion 1 | |
# @raycast.title Logitech Litra Glow Light Off | |
# @raycast.mode silent | |
$HOME/bin/litra dark |
we have a project that’s using Node v12 and Angular 7. when i try to build the project with ng build i get An unhandled exception occurred: Object prototype may only be an Object or null: undefined
lots of people on the internet have this problem. there are a few dozen stackoverflow answers, and there are issues on both webpack and typescript the blame each other. it seems to have something to do with circular dependencies, but i’ve run madge --circular --extensions ts ./
which claims to find circular deps but it says none are found. in fact, if i delete all of the page source code other than the entry point, the error still occurs. so this seems to be a bug with the angular build system. i’ve hooked up a debugger and tried to step through the stack but i haven’t found anything useful.
a lot of people say “ok, run ng update.
” well, that doesn’t seem to do anything useful. i’ve tried updating to just node v14 and v16, i’ve tried running node-check-updates
to update dependencies. warping ahead to Angu