Skip to content

Instantly share code, notes, and snippets.

View ashnel3's full-sized avatar

Ash Nelson ashnel3

View GitHub Profile
@ashnel3
ashnel3 / Svg.astro
Created August 17, 2024 18:54
inline-svg w/ no dependencies in astro.
---
export interface Props {
raw: string
title: string
class?: string
width?: number
height?: number
viewBox?: string
xmlns?: string
}

Crash landing installation:

Problem

2023-05-13 23:56:38 [SEVERE] [ForgeModLoader] Unable to launch
java.util.ConcurrentModificationException

Solution

    1. Download CrashLanding
// ================================
// Fetch stream to file
// ================================
import { Readable } from 'stream'
import { createWriteStream } from 'fs'
import { finished } from 'stream/promises'
const downloadFile = async (path, url) => {
const res = await fetch(url)
@ashnel3
ashnel3 / aberoth-screenshot.js
Created October 7, 2019 06:30
aberoth-screenshot
/* aberoth-screenshot
* Adds a screenshot button to Aberoth!
*/
function screenshot () {
const data = document.getElementById('screen').toDataURL() // Screenshot image
const a = document.createElement('a')
a.download = 'screenshot.png' // Output file name
a.href = data
a.style.visibility = 'hidden'
@ashnel3
ashnel3 / champions-to-json.js
Last active December 16, 2019 00:30
champions-to-json
/*
* champions-to-json v1.1
* Downloads Aberoth's leaderboards as json!
*
* Copyright (c) 2019 Ash Nelson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell