Skip to content

Instantly share code, notes, and snippets.

View miou-gh's full-sized avatar

miou miou-gh

  • Canada
View GitHub Profile
import discord
import asyncio
import os
import time
import sys
import cloudscraper
from PIL import Image
from io import BytesIO
# get character encoding for printing to the terminal
@miou-gh
miou-gh / CustomMessage.cs
Last active April 26, 2020 16:33
A class containing custom messages for Everybody Edits Worlds.
using EEUniverse.Library;
public static class CustomMessage
{
/// <summary>
/// <b>(Client->Server)</b> Register a sound for the specified user. <br></br><br></br> <b>Message Args:</b>
/// <br> <b>int</b> Player Id </br>
/// <br> <b>int</b> Sound Id </br>
/// <br> <b>byte[]</b> Sound Data </br>
/// </summary>
@miou-gh
miou-gh / pusher.py
Created October 25, 2019 13:50
A discord bot for pushing content into other channels.
import re
import io
import discord
import requests
from datetime import datetime
from discord.ext import commands
bot = commands.Bot(command_prefix='bp!')
@bot.command(brief='A command to move a message into another channel.', description='A command to move a message into another channel. (bp!move <message id> <channel>)')
@miou-gh
miou-gh / PlayerIOLite.cs
Last active November 25, 2018 09:00
A small proof-of-concept lightweight version of PlayerIOClient.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Collections;
using System.Net.Sockets;
namespace ProtocolMessage
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
diff --git a/mseoserv/commands/debug.cpp b/mseoserv/commands/debug.cpp
index 5bebb40..38026f9 100644
--- a/mseoserv/commands/debug.cpp
+++ b/mseoserv/commands/debug.cpp
@@ -28,6 +28,66 @@
namespace Commands
{
+void GiveItem(const std::vector<std::string>& arguments, Character* from)
+{
public static class StringExtensions
{
public static string FormatIRC(this string input)
{
return Regex.Replace(input, @"\[([^\]]*)\]\((.*?)\s*?\s*\)", (match) => {
var codes_portion = (match.Groups[1].Value).Split(' ', ',');
var color_check = new Func<string, ColorCode>((value) => Enum.TryParse(value, true, out ColorCode result) ? result : ColorCode.Invalid);
var control_check = new Func<string, ControlCode>((value) => Enum.TryParse(value, true, out ControlCode result) ? result : ControlCode.Invalid);
public static class StringExtensions
{
public static string FormatIRC(this string input)
{
return Regex.Replace(input, @"\[([^\]]*)\]\((.*?)\s*?\s*\)", (match) => {
var codes_portion = (match.Groups[1].Value).Split(' ', ',');
var color_check = new Func<string, ColorCode>((value) => Enum.TryParse(value, true, out ColorCode result) ? result : ColorCode.Invalid);
var control_check = new Func<string, ControlCode>((value) => Enum.TryParse(value, true, out ControlCode result) ? result : ControlCode.Invalid);
# place in ~/.bashrc
# replace ~/scripts/ with the directory where you placed the script
yt() {
(python /home/allie/scripts/youtube.py "$1" </dev/null &>/dev/null &)
}
############
# youtube.py
############
import sys
public static (int x, int y) DiamondToStaggered(int x, int y) =>
(x: (((y - x) >> 1) * -1) * 2, y: x + y);