Skip to content

Instantly share code, notes, and snippets.

View aronsommer's full-sized avatar

Aron Sommer aronsommer

View GitHub Profile
@aronsommer
aronsommer / ios-contextmenu-test.html
Created October 6, 2025 19:30
A simple HTML file to test contextmenu event and pointerType compatibility on desktop and mobile browsers. This test demonstrates that the event does not fire on a long-press in iOS Safari.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Simple ContextMenu Test</title>
<style>
body,
html {
height: 100%;
@aronsommer
aronsommer / justify-content-examples.html
Created September 13, 2025 10:56
A clean HTML file showing all justify-content examples from this helpful CSS Flexbox tutorial: https://ghosttogether.net/tutorial/css/justify-content-examples
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-g" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CSS Flexbox: justify-content Examples</title>
<style>
body {
background-color: #e3e5e8;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
@aronsommer
aronsommer / enabling-https-for-live-server-visual-studio-code-extension.md
Last active September 9, 2025 11:07
Enabling HTTPS for Live Server Visual Studio Code extension

Enabling HTTPS for Live Server Visual Studio Code extension

To generate the private key and certificate you need to have OpenSSL installed.

Step 1: Generate Private Key and Certificate

Generate the Private Key

Enter the following command in your terminal to generate a private key file named localhost.key.

@aronsommer
aronsommer / location-arrow.svg
Created September 8, 2025 10:38
Location arrow SVG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aronsommer
aronsommer / utils.ts
Last active September 7, 2025 20:11
Hiking time calculation for the profile on map.geo.admin.ch
import { format } from '@geoadmin/numbers'
import type { ElevationProfilePoint } from '@/profile.api'
export interface ElevationProfileMetadata {
totalLinearDist: number
minElevation: number
maxElevation: number
elevationDifference: number
totalAscent: number
@aronsommer
aronsommer / gist:949217ca378eb9c1b03dc96e7465997e
Created September 2, 2025 06:17
How to Permanently Remove a File/Folder from Git History using git filter-repo
# Navigate to your local repository
cd <path/to/your/repo>
# Rewrite the history to remove the file or folder
# Replace <path/to/remove> with the folder or file path you want to delete
git filter-repo --path <path/to/remove> --invert-paths --force
# Reconnect to your remote repository if the connection was removed
# Replace <your-remote-repo-url> with the URL of your repository
git remote add origin <your-remote-repo-url>
@aronsommer
aronsommer / gist:d8ef658d19214886b06ca6dc90429fa0
Created August 29, 2025 10:11
Force Delete the Last Pushed Git Commit
# 1. Reset your local branch back by one commit, deleting the last commit's changes
git reset --hard HEAD^
# 2. Force push the updated (and shorter) history to the remote branch
git push origin <your-branch-name> --force
/*
* L.PolylineUtil contains utilify functions for polylines, two methods
* are added to the L.Polyline object to support creation of polylines
* from an encoded string and converting existing polylines to an
* encoded string.
*
* - L.Polyline.fromEncoded(encoded [, options]) returns a L.Polyline
* - L.Polyline.encodePath() returns a string
*
* Actual code from:
@aronsommer
aronsommer / Sora-prompts.md
Created April 12, 2025 18:10 — forked from ruvnet/Sora-prompts.md
Crafting Cinematic Sora Video Prompts: A complete guide

300+ Cinematic Sora Video Prompts

Introduction to Cinematic Sora Video Prompts

Welcome to the Cinematic Sora Video Prompts tutorial! This guide is meticulously crafted to empower creators, filmmakers, and content enthusiasts to harness the full potential of Sora, an advanced AI-powered video generation tool.

By transforming textual descriptions into dynamic, visually compelling video content, Sora bridges the gap between imagination and reality, enabling the creation of professional-grade cinematic experiences without the need for extensive technical expertise.

What This Tutorial Offers

@aronsommer
aronsommer / index.html
Created November 24, 2024 17:42
HTML Redirect with Dynamic JavaScript Link Update
<html>
<head>
<script type="text/javascript">
var gameURL = "https://www.google.com/"; // Set your URL here once
window.location.href = gameURL; // Redirect automatically
</script>
</head>
<body>
<p>
If you're not redirected automatically, follow this