Skip to content

Instantly share code, notes, and snippets.

View auxiliary-character's full-sized avatar

Auxiliary-Character auxiliary-character

View GitHub Profile
@auxiliary-character
auxiliary-character / integer_overflow_test.c
Created December 19, 2012 08:10
Some proof for chunkydrunky and lolrsk8s_3
#include <stdio.h>
int n = 4294967295;
int main(void){
printf("%i\n",n);
return 0;
}
@auxiliary-character
auxiliary-character / startup.lua
Last active December 11, 2015 02:09
Wall Clock in ComputerCraft
select(1) --Have a sign in slot 1.
while true do
turtle.dig()
turtle.place(textutils.formatTime(os.time,true)) --Change to false for 12 hour time.
sleep(1)
end
#!/usr/bin/env python
import websocket
import json
def on_message(ws, message):
print("\n\n{0}".format(message))
def on_error(ws, error):
print("\n\n##Error##\n\n{0}".format(error))
turtle.select(1)
while true do
if turtle.getItemCount(1) > 0 then
turtle.drop()
else
turtle.suckUp()
end
end
--auxchar's ComputerCraft Trade Script--
--Edit These.
tradeName = "Example Trade"
supplyChestName = "diamond_chest_1" --name the upper chest gives you when you right click on its modem.
currencyChestName = "diamond_chest_0" --same, but for the lower chest
price = 1 --These need to be whole numbers.
payOut = 1
--You may or may not need to chaange these...
#!/usr/bin/env python3
import csv
import sys
firstdata = {}
with open(sys.argv[1],"r") as csvfile1:
reader1=csv.reader(csvfile1,delimiter=" ")
for line in reader1:
firstdata[line[4]]=line[2]
with open(sys.argv[2],"r") as csvfile2:
#!/usr/bin/env python3
import csv
import sys
firstdata = {}
with open(sys.argv[1],"r") as csvfile1:
reader1=csv.reader(csvfile1,delimiter=" ")
for line in reader1:
if line[2] in firstdata:
firstdata[line[2]] = firstdata[line[2]]+list([line[4]])
#!/usr/bin/env python3
import xml.etree.ElementTree as etree
import readline
attribs=["name","version","url","file","website","donation","type","server","optional","download","description","done"]
def addTags(mods):
notDone = True
while notDone:
newMod = {}
<version>
<pack>
<version>1.3.0</version>
<minecraft>1.6.4</minecraft>
<mainclass>net.minecraft.launchwrapper.Launch</mainclass>
<extraarguments>--tweakClass=cpw.mods.fml.common.launcher.FMLTweaker</extraarguments>
</pack>
<libraries>
<library download="server" file="launchwrapper-1.8.jar" md5="460ffeedae268dc70c8210ce179fa44a" server="net/minecraft/launchwrapper/1.8/launchwrapper-1.8.jar" url="packs/TheNukeAndTurtle/files/launchwrapper-1.8.jar" />
<library download="server" file="asm-all-4.1.jar" md5="d21c2a06a4e6b175aa01e328f38a1182" server="org/ow2/asm/asm-all/4.1/asm-all-4.1.jar" url="packs/TheNukeAndTurtle/files/asm-all-4.1.jar" />
function getRandomInt (min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function die(sides){
return getRandomInt(1,sides);
}
function dice(dice,sides){
var total = 0;