Skip to content

Instantly share code, notes, and snippets.

<?php
require("bin/API/Scratch.php")
var scratch = new ScratchWebsiteFromURL("scratch.mit.edu");
scratch->gainSuperUserAccess();
var me = scratch->getUserByName("comp500");
var scratchteam = scratch->getST();
scratchteam->removeAllMembers();
var member = scratchteam->addMember(me);
scratchteam->setOwner(member);
member->hackScratch();

Keybase proof

I hereby claim:

  • I am comp500 on github.
  • I am comp500 (https://keybase.io/comp500) on keybase.
  • I have a public key ASAL1bTNtCzF3YK7jYL_O_OJpIV4acrKlNMbZ08cKx9PMwo

To claim this, I am signing this object:

@comp500
comp500 / cursetoCSV.js
Created February 17, 2017 15:20
Curse to CSV
// require modules
var path = require('path');
var fs = require('fs');
var url = require('url');
var prompt = require('prompt');
if (!process.env.APPDATA) { // Check for AppData existence
throw new Error("AppData not found. Are you on windows?");
}
var instancesFile = path.join(process.env.APPDATA, "Curse Client/GameInstances/MinecraftGameInstance.json"); // find instances file
@comp500
comp500 / recipedump.js
Last active April 7, 2017 12:20
I'll just leave this here. It probably won't work on any system unless you clone my PC.
var fs = require('fs');
var windows1252 = require('windows-1252');
function parseRecipes(callback, itemList) {
fs.readFile('recipes.txt', 'utf8', function (err, data) {
if (err) throw err;
var dataLines = data.split('\n');
console.log(dataLines.length + " recipes");
var recipes = [];
var oreDictionary = [];
@comp500
comp500 / en_US.lang
Last active August 10, 2017 14:59
These files are used to make the FTBUtilities Guide pages for Quark. The features JSON file is downloaded from github and used to make documentation files. To use it, install node.js, put index.js and package.json in a folder, run npm install then node index.js.
quark.guide=Quark
@comp500
comp500 / vscode.json
Created May 4, 2018 15:24
Visual Studio Code concfg theme
{
"black": "#1E1E1E",
"dark_blue": "#2472C8",
"dark_green": "#0DBC79",
"dark_cyan": "#11A8CD",
"dark_red": "#CD3131",
"dark_magenta": "#BC3FBC",
"dark_yellow": "#E5E510",
"gray": "#CCCCCC",
"dark_gray": "#666666",
@comp500
comp500 / .config
Last active June 4, 2018 16:40
Buildroot x86_64 notes
BR2_HAVE_DOT_CONFIG=y
BR2_HOST_GCC_AT_LEAST_4_5=y
BR2_HOST_GCC_AT_LEAST_4_6=y
BR2_HOST_GCC_AT_LEAST_4_7=y
BR2_HOST_GCC_AT_LEAST_4_8=y
BR2_HOST_GCC_AT_LEAST_4_9=y
BR2_HOST_GCC_AT_LEAST_5=y
BR2_HOST_GCC_AT_LEAST_6=y
BR2_HOST_GCC_AT_LEAST_7=y
BR2_ARCH_IS_64=y
@comp500
comp500 / regex.md
Last active September 8, 2018 21:02
Caddy documentation for regular expression replacement (https://github.com/mholt/caddy/pull/2144) (licensed public domain/CC0)

Syntax

header_upstream name value
header_downstream name value
header_upstream name regex replacement
header_downstream name regex replacement
  • (existing header_upstream doc)
  • header_upstream can also be used with an extra argument, where the field name is name, the regular expression to match in it is regex, and the value to replace the match with is value. This option allows values within headers to be modified based on those values, can be specified multiple times for multiple headers and for multiple modifications of the same header. Capture groups are supported and substituted into the replacement (as $1, $2, etc.) and request placeholders can be used in the replacement. The regular expressions use Go's syntax described here.
/* ==UserStyle==
@name thonk
@namespace comp500
@version 1.0.0
@description Replaces GitHub's Confused emoji with thonk
@author comp500
==/UserStyle== */
/*
Doesn't work for some reason
@comp500
comp500 / finder.zs
Last active April 12, 2019 13:41
ZenScroll loop finder
import crafttweaker.recipes.ICraftingRecipe;
import crafttweaker.item.IIngredient;
import crafttweaker.item.IItemStack;
// ZenScroll loop finder, by comp500.
// Finds crafting loops added by mods and creates ZenScroll scroll groups for them.
// Requires: https://minecraft.curseforge.com/projects/zenscroll
// Revision 4: improved comments
// To use: