Skip to content

Instantly share code, notes, and snippets.

@marshallrichards
marshallrichards / instructions.md
Last active December 18, 2025 15:03
Android Termux Minecraft Server Instructions

VER=1.18.1

Mojang offical minecraft server:

MANIFEST="https://launchermeta.mojang.com/mc/game/version_manifest_v2.json"
META_URL="$(curl -sL "$MANIFEST" | jq -r --arg v "$VER" '.versions[] | select(.id==$v) | .url')"
SERVER_URL="$(curl -sL "$META_URL" | jq -r '.downloads.server.url')"
curl -L -o "server-$VER.jar" "$SERVER_URL"

PaperMC minecraft server (recommended):

@ArunMichaelDsouza
ArunMichaelDsouza / html-to-canvas.js
Created January 30, 2020 16:40
Rendering HTML on the canvas as an SVG image blob.
const data = `
<svg xmlns="http://www.w3.org/2000/svg">
<foreignObject width="100%" height="100%">
<div xmlns="http://www.w3.org/1999/xhtml" style="border: 2px solid red; padding: 20px;">
<span style="font-size: 22px;">This will be rendered on the canvas.</span>
</div>
</foreignObject>
</svg>
`;
const svg = new Blob([data], { type: 'image/svg+xml;charset=utf-8' });
@davidteren
davidteren / ruby_on_rails_rspec_prompt.md
Created May 8, 2024 15:16
Prompt to Analyze and Test Ruby on Rails Code with RSpec

Prompt: Analyze and Test Ruby on Rails Code with RSpec

Task Description:

You have been given a Ruby on Rails code snippet. Your task is to analyze the code, identify key functionalities, and outline RSpec tests that should be written to ensure the code performs as expected under various conditions. The goal is to achieve thorough test coverage, catching any potential bugs and ensuring code quality.

Code Snippet:

# Please insert the given Ruby on Rails code here
@dadhi
dadhi / GetMaterializedViewSize.sql
Last active December 18, 2025 14:56
Find disk size of Postgres materialized view
/*
https://dba.stackexchange.com/questions/96534/postgres-check-disk-space-taken-by-materialized-view?newreg=6b1d58604fce4a1fbe3033ddbb52d7ca
relkind:
r = ordinary table,
i = index,
S = sequence,
v = view,
m = materialized view,
c = composite type,
@kushan1999-g
kushan1999-g / Index.html
Created December 18, 2025 14:44
Kavee Closthing
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kavee Clothing App</title>
<style>
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f4f4f9; margin: 0; padding: 20px; }
.header { text-align: center; background: #333; color: white; padding: 20px; border-radius: 10px; margin-bottom: 20px; }
.header h1 { margin: 0; }
@trevc
trevc / Fix Davinci Resolve on Arch Linux - Oct 25th 2025 _ZNSt3__14cerrE.md
Last active December 18, 2025 14:55
Fix Davinci Resolve on Arch Linux - Oct 25th 2025 _ZNSt3__14cerrE

This fixes the following Davinci Resolve error if you ran a system update (pacman -Syu) after Oct 25th:

/opt/resolve/bin/resolve: Symbol `_ZNSt3__14cerrE' has different size in shared object, consider re-linking
/opt/resolve/bin/resolve: Symbol `_ZNSt3__14coutE' has different size in shared object, consider re-linking
fish: Job 1, '/opt/resolve/bin/resolve' terminated by signal SIGSEGV (Address boundary error)

If you're on Bash, it'll show: Segmentation fault (core dumped)

 Arch’s October update to libc++ and libc++abi broke compatibility with some Resolve 20.x releases. Add the old libc++ libraries to Resolve's /opt/resolve/libs/ dir:

@nntrn
nntrn / espn-api-list.md
Last active December 18, 2025 14:50
List of nfl api endpoints from espn

List of NFL API Endpoints

This page has been updated a lot in the past 3 years. Older revisions you might like more than this one:

@jcubic
jcubic / cdn.md
Last active December 18, 2025 14:48
How to setup a literally free CDN
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active December 18, 2025 14:58
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under Discover -> Quests
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter:

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by