Skip to content

Instantly share code, notes, and snippets.

View anna-is-cute's full-sized avatar

Anna anna-is-cute

View GitHub Profile
@anna-is-cute
anna-is-cute / MCSOD.d
Last active January 1, 2016 13:59
MCSignOnDoor in D
/*
* MCSignOnDoor rewrite in D by jkcclemens <jkc.clemens@royaldev.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@anna-is-cute
anna-is-cute / Classy.html
Last active January 2, 2016 18:48
Classy
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Time to Class Up</title>
<link rel="stylesheet" type="text/css" href="https://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css"/>
<style>
iframe {
width: 100%;
height: 450px;
// h() is every tick
// Default Minecraft h() method
public void h() {
boolean flag = this.burnTime > 0;
boolean flag1 = false;
int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
this.lastTick = MinecraftServer.currentTick;
package net.minecraft.server.v1_7_R1;
import org.bukkit.craftbukkit.v1_7_R1.entity.CraftHumanEntity;
import org.bukkit.craftbukkit.v1_7_R1.inventory.CraftItemStack;
import org.bukkit.entity.HumanEntity;
import org.bukkit.event.inventory.FurnaceBurnEvent;
import org.bukkit.event.inventory.FurnaceSmeltEvent;
import java.util.ArrayList;
import java.util.List;
@EventHandler(priority = EventPriority.HIGH)
public void zombieIsMasterRace(CreatureSpawnEvent e) {
if (e.getEntityType() == EntityType.ZOMBIE) { // convert ALL zombies in ALL worlds
if (ZombieSpawner.getSurvivorsZombie((Zombie) e.getEntity()) == null) {
e.setCancelled(true);
ZombieSpawner.spawnLeveledZombie(e.getLocation());
}
return;
}
final Entity entity = e.getEntity();
@anna-is-cute
anna-is-cute / data.py
Created May 22, 2014 18:51
ten.java points stats
from json import loads
from urllib.request import urlopen
from statistics import mean, median, mode, stdev, variance
def getPointsList(transactions):
points = []
for transaction in transactions:
points.append(transaction["amount"])
return points
@anna-is-cute
anna-is-cute / google.py
Created May 27, 2014 05:00
Google Voice
from os import listdir
from urllib2 import urlopen
from sys import argv
from subprocess import call
if len(argv) < 2:
quit()
words = argv[1:]
for word in words:
files = listdir(".")
if ("%s.mp3" % word) in files: continue
/**
* ZNC Push Module
*
* Allows the user to enter a Push user and API token, and sends
* channel highlights and personal messages to Push.
*
* Copyright (c) 2011 John Reese
* Licensed under the MIT license
*/
// --- Expected behavior ---
// FROM PLAYER :
// /kh : Show kick history of self (first)
// /kh 2 : Show kick history of self (second)
// /kh person : Show kick history of person (first)
// /kh person 2 : Show kick history of person (second)
// FROM CONSOLE :
// /kh : Usage
// /kh 2 : Usage
private class Pair<T, U> {
private final T first;
private final U second;
private Pair(T first, U second) {
this.first = first;
this.second = second;
}
public T getFirst() {