Skip to content

Instantly share code, notes, and snippets.

View smbarbour's full-sized avatar

Scott M. Barbour smbarbour

View GitHub Profile
@smbarbour
smbarbour / gist:251e005ca1297ef29ac47858c76b5916
Last active July 28, 2023 06:04
legacy.curseforge.com TamperMonkey script for MCUpdater
// ==UserScript==
// @name Curseforge MCUpdater URL getter
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Copies the download URL for the mod jar for MCUpdater to clipboard
// @author edwardg
// @match https://legacy.curseforge.com/minecraft/mc-mods/*/files/*
// @grant GM_setClipboard
// ==/UserScript==
<?xml version="1.0" encoding="UTF-8" ?>
<tns:Distributions xmlns:tns="http://www.mcupdater.com/Distribution" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mcupdater.com/Distribution Distribution.xsd ">
<tns:Distribution name="JavaFX-Release">
<tns:FriendlyName>MCUpdater 4.0</tns:FriendlyName>
<tns:Class>org.mcupdater.gui.javafx.Main</tns:Class>
<tns:Params>--ServerPack ${defaultPack} --MCURoot ${MCURoot}</tns:Params>
<tns:Library>
<tns:Filename>MCUpdater.jar</tns:Filename>
<tns:Size>0</tns:Size>
<tns:Hash type="SHA256">tbd</tns:Hash>
<?xml version="1.0" encoding="UTF-8"?>
<ServerPack version="3.4" xmlns="http://www.mcupdater.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mcupdater.com http://files.mcupdater.com/ServerPackv2.xsd">
<Server id="newserver" abstract="false" name="New Server" newsUrl="about:blank" version="1.16.5" generateList="true" autoConnect="true" revision="" mainClass="net.minecraft.launchwrapper.Launch" launcherType="Vanilla">
<Import>null</Import>
</Server>
</ServerPack>

Keybase proof

I hereby claim:

  • I am smbarbour on github.
  • I am smbarbour (https://keybase.io/smbarbour) on keybase.
  • I have a public key whose fingerprint is 778B 2D5E 60E9 05AE 8EE6 F3FB 3B74 8407 B9FD 513A

To claim this, I am signing this object:

import mods.agricraft.growing.BaseBlock;
BaseBlock.set(<AgriCraft:seedAurigold>, <minecraft:gold_block>, 1, true);
BaseBlock.set(<AgriCraft:seedCuprosia>, <ThermalFoundation:Storage:0>, 1, true);
BaseBlock.set(<AgriCraft:seedDiamahlia>, <minecraft:diamond_block>, 1, true);
BaseBlock.set(<AgriCraft:seedEmeryllis>, <minecraft:emerald_block>, 1, true);
BaseBlock.set(<AgriCraft:seedFerranium>, <minecraft:iron_block>, 1, true);
BaseBlock.set(<AgriCraft:seedJaslumine>, <ImmersiveEngineering:storage:1>, 1, true);
BaseBlock.set(<AgriCraft:seedLapender>, <minecraft:lapis_block>, 1, true);
BaseBlock.set(<AgriCraft:seedNiccissus>, <ThermalFoundation:Storage:4>, 1, true);
@smbarbour
smbarbour / ClientProxy.java
Last active December 9, 2022 05:42
ItemColors implementation
package com.example.examplemod;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.FMLLog;
/**
* Created by sbarbour on 4/7/16.
CREATE OR REPLACE FUNCTION meta_find_references(tablename text)
RETURNS TABLE (type text, name text)
AS $$
SELECT 'View', table_name FROM information_schema.views WHERE view_definition ~* $1
UNION
SELECT 'Function', routine_name FROM information_schema.routines WHERE routine_definition ~* $1
ORDER BY 1, 2
$$
LANGUAGE SQL;
This file has been truncated, but you can view the full file.
[01:34:55] [main/DEBUG] [FML/]: Injecting tracing printstreams for STDOUT/STDERR.
[01:34:55] [main/INFO] [FML/]: Forge Mod Loader version 7.99.40.1614 for Minecraft 1.7.10 loading
[01:34:55] [main/INFO] [FML/]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_72, running on Linux:amd64:3.19.0-49-generic, installed at /usr/lib/jvm/java-8-oracle/jre
[01:34:55] [main/DEBUG] [FML/]: Java classpath at launch is /home/sbarbour/.MCUpdater/instances/imaginescape/lib/forge-10.13.4.1614.jar:/home/sbarbour/.MCUpdater/instances/imaginescape/lib/launchwrapper.jar:/home/sbarbour/.MCUpdater/instances/imaginescape/lib/asm.jar:/home/sbarbour/.MCUpdater/instances/imaginescape/lib/scala-lib.jar:/home/sbarbour/.MCUpdater/instances/imaginescape/lib/scala-compiler.jar:/home/sbarbour/.MCUpdater/instances/imaginescape/lib/scala-actors-migration.jar:/home/sbarbour/.MCUpdater/instances/imaginescape/lib/scala-continuations-library.jar:/home/sbarbour/.MCUpdater/instances/imaginescape/lib/scala-continuations-plugin.jar:/home/sbar
@smbarbour
smbarbour / partitioning.sql
Last active January 29, 2016 18:05
PostgreSQL inter-related table partitioning
CREATE TABLE testsummary
(
rowid serial NOT NULL,
rundate date,
data text,
PRIMARY KEY (rowid)
);
CREATE TABLE testdetail
(
@smbarbour
smbarbour / Meddle.xml
Created December 10, 2015 21:26
Including Meddle in MCUpdater modpacks
<Module name="Meddle" id="meddle">
<URL priority="0">http://www.fybertech.net/maven/net/fybertech/meddle/1.3/meddle-1.3.jar</URL>
<Required>true</Required>
<ModType order="1" launchArgs="--tweakClass net.fybertech.meddle.Meddle">Library</ModType>
<MD5>20309756363e294c947ea18f73a60430</MD5>
<Size>11867</Size>
<Submodule id="launchwrapper" name="Mojang (LaunchWrapper)">
<URL priority="0">https://libraries.minecraft.net/net/minecraft/launchwrapper/1.11/launchwrapper-1.11.jar</URL>
<URL priority="1">http://files.mcupdater.com/lib/launchwrapper-1.11.jar</URL>
<MD5>189acaecbe31eeb4366bca7ba17d7496</MD5>