Skip to content

Instantly share code, notes, and snippets.

View LeoJofer's full-sized avatar

Leo Jofer LeoJofer

  • Munich
  • 23:15 (UTC +01:00)
View GitHub Profile
@LeoJofer
LeoJofer / brave.html
Created November 10, 2025 23:09
Find out if a user is using brave
<!DOCTYPE html>
<html>
<!doctype html>
<head>
<meta charset="utf-8">
<title>BraveIdent</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
@LeoJofer
LeoJofer / clone.sh
Last active April 25, 2025 13:44
bash git clone command shortcut
clone () {
if [ -z "$1" ]; then
echo "Usage: clone <username> <repository> OR clone <repository> after setting up the default username"
return 1
fi
username="$1"
if [ -z "$2" ]; then
username="simulationguest"
repo="$1"
@LeoJofer
LeoJofer / Dockerfile
Last active October 6, 2024 12:03
Sveltekit Dockerfile
FROM node:20-alpine AS base
FROM base AS dependencies
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN corepack enable pnpm
RUN pnpm i --frozen-lockfile
<script lang="ts">
let gyro = new Gyroscope({ frequency: 60 });
let x = 0,
y = 0,
z = 0;
gyro.addEventListener("reading", () => {
x += gyro.x;