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
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": "xxxxx", | |
"version": "1.0.0", | |
"license": "UNLICENSED", | |
"private": true, | |
"scripts": { | |
"format": "prettier --write .", | |
"prepare": "husky install", | |
"lint": "pnpm -r lint --fix", | |
"types:check": "pnpm -r types:check", |
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
#!/usr/bin/env bash | |
if [[ "$@" == *"camera -event on"* ]]; then | |
$HOME/bin/litra light | |
fi | |
if [[ "$@" == *"camera -event off"* ]]; then | |
$HOME/bin/litra dark | |
fi |
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
/** | |
* 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. |
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
// 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) | |
}) |
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
/*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 |
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": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": [ | |
"athena:StartQueryExecution", | |
"athena:ListDataCatalogs", | |
"glue:GetTableVersions", |
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
/*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 |
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 { 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 ...") |
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
#!/usr/bin/env bash | |
set -eo pipefail | |
srcdir="$1" | |
if [ -z "$srcdir" ]; then | |
echo "usage: $0 <dir>" | |
exit 1 | |
fi |
NewerOlder