Skip to content

Instantly share code, notes, and snippets.

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

Invalid Name coder0107git

🎯
Focusing...
  • [object Object]
  • 15:12 (UTC -06:00)
View GitHub Profile
@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 February 20, 2024 00:03
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.

@coder0107git
coder0107git / file.gs.js
Last active August 19, 2023 22:25 — forked from yosida95/gist:4186224
Task Reminder with Google Apps Script
const USERS_SHEET_NAME = "users",
TASKS_SHEET_NAME = "tasks",
SPREADSHEET_URL = "https://docs.google.com/spreadsheets/d/abc123456/edit", /* TODO(Developer): Replace the spreadsheet ID */
/* Use `SpreadsheetApp.getActiveSpreadsheet()` if the Apps Script was created from a Google Sheet. */
spreadsheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL);
const getEmailByNickname = (() => {
const usersSheet = spreadsheet.getSheetByName(USERS_SHEET_NAME);
let userEmailTable = {};