Skip to content

Instantly share code, notes, and snippets.

View ewized's full-sized avatar

ewized

View GitHub Profile
@ewized
ewized / Web Portal
Last active January 17, 2023 06:22
Simple web portal with HTML5, CSS3, and Javascript.
<!DOCTYPE html>
<html>
<head>
<title>Portal Site</title>
<meta name="description" content="Portal Site not Portal"/>
<meta name="keywords" content="Minecraft"/>
<link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<style type="text/css" rel="stylesheet">
body {
@ewized
ewized / keygen.php
Created September 23, 2014 04:58
Simple md5 encrypt.
<?php
$data = $_POST["data"];
$is_data = isset($data);
?>
<form method="post">
<label> Key
<?php if ($is_data): ?>
<input name="data" type="text" value="<?= md5($data) ?>" size="30" />
<?php else: ?>
<input name="data" type="password" size="30" />
@ewized
ewized / keep_sync.sh
Last active August 29, 2015 14:07
Mirror GitHub repos, when you have oauth access keys set up, this can be set up as a cron job.
#!/bin/bash
# This will keep a list of repositories in sync.
# This is a one way parent -> fork
DATE=$(date -u +%F-%H-%M-%S)
SYNC_FOLDER=keep_sync_folder
KEY=
cd ~
@ewized
ewized / countdown.py
Created October 24, 2014 21:47
Sample code to display the new countdown for MC 1.8 titles
#!/usr/bin/python3
import time
# Center the text with the deli
def center_text(header: str, deli: str, size: int) -> str:
half = int(size / 2 - len(header) / 2)
return deli*half + " " + header + " " + deli*half
# Return True or False if index is in the no no spot
def nono(header: str, size: int, pos: int):
@ewized
ewized / config.yml
Last active August 29, 2015 14:08
AntiCheat Settings
# AntiCheat configuration file
# Please report any bugs: https://github.com/gravitylow/AntiCheat/issues
xray:
# Should AntiCheat use calculations to try and find xrayers?
check-xray: false
# Should a warning be sent to admins when a person is found that could be xraying?
alert: false
# How often (in seconds) should AntiCheat check for xrayers if alert is true?
alert-interval: 60
# Should players in creative mode be tracked for possible xray usage?
@ewized
ewized / pidkill.sh
Last active August 29, 2015 14:11
This script will kill all dead java processes
#!/bin/bash
# This script will find kill all dead minecraft servers
# It will attempt to restart the servers before they die
LAST=""
for process in $(ps a | grep java | awk '{print $1 " " $4}') ; do
if [ "$LAST" = "" ] ; then
LAST=$process
else
@ewized
ewized / install-java8.sh
Last active August 29, 2015 14:23
Install Oracle Java 8
#! /bin/bash
# Make sources
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | \
tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | \
tee -a /etc/apt/sources.list.d/webupd8team-java.list
# Update sources
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
@ewized
ewized / Circles.groovy
Last active February 3, 2022 02:28
Parametric equations for circles
import net.year4000.ducktape.bukkit.DuckTape
import net.year4000.ducktape.bukkit.module.BukkitModule
import net.year4000.ducktape.bukkit.module.ModuleListeners
import net.year4000.ducktape.module.ModuleInfo
import org.bukkit.Bukkit
import org.bukkit.event.player.PlayerInteractEvent
import org.bukkit.event.EventHandler
import org.bukkit.event.Listener
import org.bukkit.Material
@ewized
ewized / statusping.py
Last active January 26, 2024 02:18
Python3 class to ping a Minecraft server and get its response including ping in ms
#!/usr/bin/python3
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
@ewized
ewized / wrapper.py
Last active February 14, 2022 12:10
A watchdog for Minecraft servers to make sure they are running all the time, even in the event of a crash.
#!/usr/local/bin/python3
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the