Skip to content

Instantly share code, notes, and snippets.

View ascenderx's full-sized avatar
🐃
Evangelizing FOSS

Jimmy Downer ascenderx

🐃
Evangelizing FOSS
View GitHub Profile
@ascenderx
ascenderx / index.html
Created April 28, 2020 03:04
Bouncing ball in box (JS for web)
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Bouncing ball in box</title>
<meta charset="UTF-8"/>
<link rel="stylesheet" href="styles.css"/>
</head>
<body>
<div class="meta-container">
<div class="canvas-container">
@ascenderx
ascenderx / ExtractMCObjects.ps1
Last active December 30, 2021 05:59
Copy Minecraft objects to human-readable file paths
$version = "1.18"
$mc = "$env:APPDATA\.minecraft"
$jsonFile = "$mc\assets\indexes\$version.json"
$json = (Get-Content $jsonFile) -Join " "
$data = ConvertFrom-Json $json
$data.objects | Get-Member -MemberType NoteProperty | ForEach-Object {
$path = $_.Name
$hash = $data.objects."$path".hash
@ascenderx
ascenderx / V8Example.java
Created February 14, 2020 05:22
Example J2V8 implementation (Debian Linux)
// Example derived from: https://eclipsesource.com/blogs/2015/06/06/registering-java-callbacks-with-j2v8/
// J2V8 is available at Maven Central: https://search.maven.org/search?q=g:com.eclipsesource.j2v8
// Compile:
// javac -cp j2v8_linux_x86_64-4.8.0.jar V8Example.java
// Run:
// java -cp ".:j2v8_linux_x86_64-4.8.0.jar" V8Example
import com.eclipsesource.v8.JavaVoidCallback;