Skip to content

Instantly share code, notes, and snippets.

View coder0107git's full-sized avatar
🎯
Focusing...

Invalid Name coder0107git

🎯
Focusing...
View GitHub Profile
@coder0107git
coder0107git / cheerpj-fs.html
Created June 12, 2025 04:34
A small wrapper for writing files to the java-writable portion of the CheerpJ filesystem.
<script src="https://cjrtnc.leaningtech.com/3_20250514_1341/loader.js"></script>
<script type="module">
import { fileOpen } from "https://cdn.jsdelivr.net/npm/[email protected]/+esm";
class CheerpJFs {
// This probably should be static
#textEncoder = new TextEncoder();
#java;
#lib;
@coder0107git
coder0107git / fiddle.css
Last active May 13, 2025 00:58
Modal dialog without any javascript
dialog[popover]:not([open]) {
box-sizing: border-box;
/*
* Readd Chrome UA styles on popover dialogs since they
* are overwritten when marked as a popover. An explanation
* I found useful was [this](https://youtu.be/yZT9906ZCLU?t=543)
* video, but be forewarned, the padding part does not apply
* to `[popover]` dialogs.
*/
@coder0107git
coder0107git / Bootable Mac ISO with Linux.md
Created April 20, 2025 01:25 — forked from coolaj86/Bootable Mac ISO with Linux.md
Create Bootable MacOS ISO from Apple's Free PKG
@coder0107git
coder0107git / index.astro
Created October 24, 2024 01:27
Astro: function to Element
---
/**
* @param moduleId Path to component
*/
function function2AstroComponent<Args extends any>(
callback: (...arg: Args[]) => any
): (...arg: Args[]) => any & {
isAstroComponentFactory: true;
propagation: "none";
name: string;
@coder0107git
coder0107git / javascript-number-horrors.js
Created April 20, 2024 20:52
The Horrors of Javascript Numbers
console.log(5) // prints: 5
Number.prototype._ = function() {
alert("Boo!");
return this;
}
Number.prototype.__ = function() {
alert("Boo!");
return this * 2;
@coder0107git
coder0107git / a_supercollider-synth-parser.md
Last active July 27, 2024 18:34
Supercollider synth def parser

About

A Supercollider synth def (scsyndef) file parser written in javascript.

Preview

The JSFiddle preview is here.

Resources

Sonic Pi has a lot of precompiled scsyndef files that can be found here. The synth sources are in the parent directory.

@coder0107git
coder0107git / code.js
Created August 26, 2023 02:09
Use `htm` easily
import htm from "https://esm.sh/htm";
import vhtml from "https://esm.sh/vhtml";
const html = htm.bind(vhtml);
function string2Nodes(string) {
const container = document.createElement("div");
container.innerHTML = string;
return container.childNodes;
@coder0107git
coder0107git / INFO.md
Last active August 20, 2023 03:05
Inline Modules in HTML

Inline modules

Why?

Recently I have found myself using various methods to inline modules for various reasons. I usually would embeded a data url but found that it wasn't flexible enough. So this is what I came up with.

Code

window.inlineModules = {};
@coder0107git
coder0107git / coordinates-system-solution-checker.js
Created February 1, 2023 18:27
Check if coordinates are a solution to simple systems in javascript
// Coordinates to check system against
const coordinates = [
[-3, 0],
[5, 1],
[-4, 3],
[2, -6],
];
// System without solving for Y
function system1(x, y) {
@coder0107git
coder0107git / submit.md
Created January 31, 2023 22:30 — forked from tanaikech/submit.md
Creating Quizzes in Google Form using Google Forms Service with Google Apps Script

Creating Quizzes in Google Form using Google Forms Service with Google Apps Script

This is a sample script for creating quizzes in Google Form using Google Forms Service with Google Apps Script.

Usage

1. Prepare questions and answers.