This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getTopPlayers($mysqli, $dbPrefix, $stat, $page) | |
{ | |
$query; | |
switch ($stat) { | |
//irrelevant stuff removed | |
default: | |
$query = "SELECT player_id,SUM(?) AS value FROM {?}player " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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]]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--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... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
turtle.select(1) | |
while true do | |
if turtle.getItemCount(1) > 0 then | |
turtle.drop() | |
else | |
turtle.suckUp() | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |