Skip to content

Instantly share code, notes, and snippets.

View ihatecsv's full-sized avatar
☢️
Totally tubular

Drake ihatecsv

☢️
Totally tubular
View GitHub Profile
@ihatecsv
ihatecsv / drawASCIICircle.js
Created April 8, 2023 20:18
drawASCIICircle by GPT4
// Written by GPT4
// Prompt: Write a JS function that returns a string of an ASCII circle of a certain radius
function drawASCIICircle(radius) {
let output = "";
for (let y = -radius; y <= radius; y++) {
for (let x = -radius; x <= radius; x++) {
// Using the equation of a circle (x^2 + y^2 = r^2)
// We add 0.5 to the threshold to make the circle look smoother
@ihatecsv
ihatecsv / generateAsciiGraph.js
Created April 8, 2023 20:30
generateAsciiGraph by GPT4
// Written by GPT4
// Prompt:
// Write a JS function that returns a string of an ASCII graph for a given function string.
// The function string should be the text of an anonymous JS function that returns a single number.
// Use eval to figure out the result of the func.
function generateAsciiGraph(funcStr, width = 50, height = 10, minX = -10, maxX = 10, minY = -10, maxY = 10) {
const func = eval(funcStr);
const stepX = (maxX - minX) / width;
@ihatecsv
ihatecsv / userscript.js
Last active September 3, 2024 19:21
Scryfall Forge MTG and Mage buttons
// ==UserScript==
// @name Scryfall to Forge MTG and Mage
// @namespace http://tampermonkey.net/
// @version 1.0.11
// @description Fetch Forge MTG and Mage card data on Scryfall card pages.
// @match https://scryfall.com/card/*
// @grant GM_xmlhttpRequest
// @require https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/java.min.js
// @resource HLJS_CSS https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css
@ihatecsv
ihatecsv / instructions.md
Last active January 27, 2025 00:21
SLAM SUPLEXER userscript