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
@tool | |
@icon("res://assets/icons/grid.svg") | |
class_name CustomTileMap | |
extends Node2D | |
@export var tile_size: Vector2 = Vector2(24, 24) | |
@export var texture: Texture2D: | |
set(value): | |
texture = value | |
if is_node_ready(): |
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
@tool | |
extends ParallaxBackground | |
@export | |
var star_colors: Array[Color] = [Color(1, 1, 1, 1), Color(0.8, 0.8, 1, 1), Color(1, 0.8, 0.8, 1)] | |
@export_range(10, 500) var num_stars_per_layer: int = 300 | |
@export_range(0.1, 2.0) var twinkle_frequency: float = 2.0 | |
@export var parallax_speeds: Array[float] = [0.1, 0.3, 0.6] | |
var viewport_size: Vector2 |
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
from machine import Pin, PWM | |
import time | |
import random | |
# Button GPIO pins | |
button_pins = [5, 18, 19, 21, 22] | |
# RGB LED GPIO pins | |
red_pin = 32 | |
green_pin = 33 |
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
from machine import Pin, PWM | |
import time | |
# Button GPIO pins | |
button_pins = [5, 18, 19, 21, 22] | |
# RGB LED GPIO pins | |
red_pin = 32 | |
green_pin = 33 | |
blue_pin = 25 |
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 |
NewerOlder