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 rust:bookworm AS rust | |
RUN apt-get update && apt install -y curl postgresql-client-15 libclang-dev | |
WORKDIR /app | |
COPY Cargo.toml Cargo.lock ./ | |
RUN cargo fetch --locked |
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
// License WTFPL | |
pub mod http_err { | |
use axum::http::StatusCode; | |
pub type HttpResult<T> = Result<T, HttpErr>; | |
pub type HttpErr = (StatusCode, String); | |
pub fn internal_error<E>(err: E) -> HttpErr | |
where | |
E: std::error::Error, | |
{ | |
(StatusCode::INTERNAL_SERVER_ERROR, err.to_string()) |
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
default: | |
@grep '^[^#[:space:].].*:' Makefile | |
start: | |
go run . | |
.PHONY=build | |
build: | |
go build . |
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
/* eslint-disable @typescript-eslint/no-explicit-any */ | |
import { ComponentType, lazy } from "react"; | |
/** | |
* Returns both the component render function and a prefetch function | |
* | |
* Example: | |
* | |
* ```ts | |
* import { lazyWithPreload } from "~/utils/lazy_with_preload"; |
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
#!/bin/bash | |
set -e | |
echo "Build frontend" | |
pushd frontend | |
yarn install --frozen-lockfile | |
yarn run build | |
popd |
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
{ | |
"type": "module", | |
"main": "./src/app.ts", | |
"scripts": { | |
"dev": "node --experimental-specifier-resolution=node --loader ts-node/esm src/app.ts" | |
}, | |
"dependencies": {}, | |
"devDependencies": { | |
"@types/node": "^20.6.0", | |
"ts-node": "^10.9.1", |
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
#!/bin/sh | |
xdg-open /home/$USER/.local/share/applications/menulibre-postman-agent.desktop | |
xdg-open /usr/share/applications/code.desktop | |
xdg-open /var/lib/flatpak/app/io.dbeaver.DBeaverCommunity/current/active/export/share/applications/io.dbeaver.DBeaverCommunity.desktop | |
xdg-open /home/$USER/.local/share/applications/firefox.desktop | |
xdg-open /usr/share/applications/xfce4-terminal.desktop |
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
class Utils { | |
static String timeMinutesSeconds(int totalSeconds) { | |
int minutes = (totalSeconds / 60).truncate(); | |
int seconds = minutes % 60; | |
return "$minutes:${seconds.toString().padLeft(2, '0')}"; | |
} | |
} |
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
#!/bin/sh | |
pacmd load-module module-null-sink sink_name=Virtual_Sink sink_properties=device.description=Virtual_Sink |
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
async function waitDocumentLoad() { | |
return new Promise<void>((resolve) => | |
window.addEventListener("load", () => resolve()) | |
) | |
} |
NewerOlder