Skip to content

Instantly share code, notes, and snippets.

using System;
using System.IO;
using System.Threading;
namespace obsidianUpdater.Utility
{
public class ServerSniffer
{
private StreamReader _reader;
private int _progress = 0;
public MTShapelessStationRecipe(IIngredient[] ingredients, ItemStack[] output, int experience, int craftingTime) {
super(ingredients.Select(i => new RecipeInputIngredient(i)).toArray(), output);
setRequiredExperience(experience);
setCraftingTime(craftingTime);
}
You're sitting at your desk,
coding away with no rest.
Many little things to fix.
Did you know asie likes unix?
Stuck inside a loop, no break in sight.
Looks like I'll be staying up all night.
Though I'm already tired, it feels like I'm wired.
export whenAll = (...tasks, next) ->
errored = false
tasksCompleted = 0
results = new Array tasks.length
callback = (index) ->
called = false
(err, ...args) ->
if errored
return
={ obsidian Modpack ]=
Former pack of the obsidian group server.
Created and maintained by copygirl.
http://copy.mcft.net/
http://twitch.tv/copygirl
Warning! This modpack is inspired by Vanilla Minecraft and
pretty difficult. It contains many recipe changes to make
@copygirl
copygirl / Breaking.zs
Created May 9, 2015 00:16
MineTweaker 3 script showing arrays and loops
import minetweaker.item.IItemStack;
var stick = <minecraft:stick>;
var axe = <ore:toolAxe>;
axe.add(<minecraft:wooden_axe:*>);
axe.add(<minecraft:stone_axe:*>);
axe.add(<minecraft:golden_axe:*>);
@copygirl
copygirl / gist:4832c98a6d673f6fe7e1
Last active August 29, 2015 14:23
WIP NBT library in action
static void NewExample()
{
var root = new TagCompound {
{ "name", "copygirl" },
{ "version", "0.0.1" },
{ "rating", 0.2F },
{ "mods", new TagList {
new TagCompound {
{ "name", "BetterStorage" },
{ "version", "0.9.9-eternally-unfinished" },
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace copyNBTlib.Text
{
class NbtFormatterNotch : INbtFormatter
{
public static readonly NbtFormatterNotch Single = new NbtFormatterNotch();
// The NBT tags to copy from the player file to the backup.
static string[] tagsToCopy = { "XpLevel", "XpP", "Inventory", "EnderItems" };
===
var player = TagBase.Load("<player>.dat"); // Load the file
var backup = new TagCompound(); // Create an empty NBT tag
// Copy over the wanted tags from the file to the empty NBT tag
for (var tag in tagsToCopy)
var cloneUrl = ...;
var branchName = ...;
var git = Git.Init().SetDirectory(Location).Call();
Repository = git.GetRepository();
// Original code in question works, is shorter,
// but this is most likely the "proper" way to do it.
var config = Repository.GetConfig();
RemoteConfig remoteConfig = new RemoteConfig(config, "origin");