WIP steps for booting device over ethernet for a faster development cycle.
(Avoid flashing SD cards for every edit).
Install VMWare tools
Linux Ubuntu expects amd64 architecture.
Build performance on c3d-standard-8-lssd (8 vCPU, 32 GB Memory, SSD)
| #!/usr/bin/python3 | |
| """ | |
| Randomly bucket files in a directory based on percentages for the purposes of machine learning training. | |
| E.g. `python3 partition-data.py --data labels:**/*.txt images:**/*.png --partitions train:80 val:10 test:10 | |
| Will move files in the current directory to: | |
| - train/ (80%) | |
| - val/ (10%) | |
| - test/ (10%) | |
| """ |
| // | |
| // MyApp.swift | |
| // MyApp | |
| // | |
| // Created by Brady Law on 8/25/23. | |
| // | |
| import SwiftUI | |
| @main |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>UIFileSharingEnabled</key> | |
| <true/> | |
| <key>LSSupportsOpeningDocumentsInPlace</key> | |
| <true/> |
| # Alpine image is smaller but Prisma is broken on M1 https://github.com/prisma/prisma/issues/8478 | |
| # FROM node:18-alpine AS builder | |
| # RUN apk update | |
| # RUN apk add --no-cache openssl | |
| FROM node:18-slim AS runner | |
| RUN apt-get update \ | |
| && apt-get install -y openssl | |
| ENV NODE_ENV production | |
| ENV NEXT_TELEMETRY_DISABLED 1 |
An example of how to add a background task (e.g. a queue consumer) to an existing NextJS project.
worker-tsconfig.json, specifically specifying "module": "commonjs" and targeting only the worker source files.package.jsonThen to build once:
| repos: | |
| - repo: https://github.com/pre-commit/pre-commit-hooks | |
| rev: v4.1.0 | |
| hooks: | |
| - id: trailing-whitespace | |
| - id: end-of-file-fixer | |
| - id: check-yaml | |
| - id: check-added-large-files | |
| - repo: https://github.com/pre-commit/mirrors-eslint | |
| rev: v8.12.0 |
| repos: | |
| - repo: local | |
| hooks: | |
| - id: typescript-check | |
| name: typescript-check | |
| entry: npx tsc | |
| language: system | |
| types_or: [ts, tsx] | |
| pass_filenames: false |
| #!/bin/sh | |
| REPO=$(git config --get remote.origin.url | sed "s/^.*://" | sed "s/\.git\$//") | |
| open https://github.com/$REPO/commit/$1 |