Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
from enum import Enum
import getopt
import http.cookiejar
import json
import logging
import os
import queue
import shlex
import shutil
@3TUSK
3TUSK / A_letter_to_modders.md
Last active April 14, 2017 07:49
This is a letter to all Minecraft modders. TLDR: blocking i/o vs. nonblocking i/o in minecraft mod on main thread. Even though we suggest things, they are still our suggestions. We are here solely for discussing this topic, including our suggestions. If you want to express your support, don't click star, reply or simply give an emoji. Stargazer …

A LETTER TO ANY MODDERS WHO SEE THIS

First of all, happy new year!

This letter has sole purpose on request of threaded version checker, or more generally speaking, threaded I/O for any operations that involved with internet. If you are a player, you may ignore this letter as it would not matter much for you.

Well, let’s talk about the version check today.
Under most circumstances, one is always expected to have mods of latest version running in his/her modpack, as it will contains less bugs/malfunctions/any of unexpected behaviors. To ensure that, modders will usually apply version check mechanism onto their mod. This is with good motive isn’t it?

@fnuecke
fnuecke / bios.lua
Created December 24, 2014 00:35
Primitive remote code execution via OC network
local m=component.proxy(component.list("modem")())
m.open(2412)
local function respond(...)
local args=table.pack(...)
pcall(function() m.broadcast(2412, table.unpack(args)) end)
end
local function receive()
while true do
local evt,_,_,_,_,cmd=computer.pullSignal()
if evt=="modem_message" then return load(cmd) end