Skip to content

Instantly share code, notes, and snippets.

View aeshthetic's full-sized avatar

A Eshwar aeshthetic

View GitHub Profile
package cf.striking.strikonomy
import cf.striking.strikonomy.Main.Companion.db
import cf.striking.strikonomy.Main.Companion.log
import org.bukkit.Material
import org.bukkit.entity.EntityType
import org.bukkit.entity.Player
import org.bukkit.event.EventHandler
import org.bukkit.event.Listener
import org.bukkit.event.block.BlockBreakEvent
type strTree =
St of int
| Leaf of string
| Tree of string * string * strTree list;;
let rec trees acc tree =
match tree with
| Tree (_, _, c) -> acc @ [tree] @ (List.fold_left (trees) [] c)
| _ -> acc;;
<!DOCTYPE html>
<html>
<head>
<title>The Docker</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy"
crossorigin="anonymous">
<link rel="stylesheet" href="/static/css/styles.css">
</head>
<body style="background-color: #e9ecef">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
@aeshthetic
aeshthetic / install-python.sh
Created January 11, 2018 14:16
Script for installing python 3.6 on CentOS
#!/usr/bin/bash
yum -y update
yum -y install yum-utils
yum -y groupinstall development
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
yum -y install python36u python36u-pip python36u-devel
class Main : JavaPlugin() {
override fun onEnable() {
server.pluginManager.registerEvents(MessageListener(), this)
}
override fun onDisable() {}
override fun onCommand(sender: CommandSender, command: Command, label: String, args: Array<out String>): Boolean {
if (sender !is Player || !args.isNotEmpty())
@aeshthetic
aeshthetic / geometria.cpp
Created July 28, 2017 23:59
One of the first (and ugliest) pieces of code i've ever written (not really something I'm proud of), whether it runs is beyond me.
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
//Functions
//GeoCalc Functions
float cylinderVolume(float rad, float hei){
float cylVol;
//Pokéconsole Trial Libraries
/*
Types:
1 = Normal
2 = Fighting
3 = Flying
4 = Poison
5 = Ground
6 = Rock
7 = Bug
@aeshthetic
aeshthetic / smogon.py
Created May 30, 2017 16:26
A simple bot that gets a pokemon's analysis from smogon
import discord
import asyncio
client = discord.Client() #Creating the bot object
@client.event #This is a convenient check that shows us some information about our bot when we start it up.
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
import discord
from discord.ext import commands
import random
description = '''An example bot to showcase the discord.ext.commands extension
module.
There are a number of utility commands being showcased here.'''
bot = commands.Bot(command_prefix='?', description=description)
def getRole(server: discord.Server, role_name: str):
this.printHand = function() {
var handCards = [];
function checkName(card) {
switch (card.getNumber()){
case 12:
return "Queen";
break;
case 13:
return "King";