Skip to content

Instantly share code, notes, and snippets.

View Mijyuoon's full-sized avatar
😂
Peak procrastination mode

Mijyuoon Mijyuoon

😂
Peak procrastination mode
View GitHub Profile
@Mijyuoon
Mijyuoon / archive-emotes.rb
Created March 2, 2021 19:02
Discord emote archiving tool
#!/usr/bin/env ruby
AUTH_TOKEN = ENV["DISCORD_TOKEN"]
OUTPUT_DIR = "./emoji-archive"
SERVER_LIST = [
# List of server IDs here
]
require 'net/http'
@Mijyuoon
Mijyuoon / Mij_Discord.theme.css
Last active October 27, 2023 12:35
Mij_Discord theme
/**
* @name Mij_Discord
* @version 0.2
* @author Mijyuoon
* @description Mijyuoon's simple Discord theme
*/
:root {
--old-green: #43b581;
--info-positive-foreground: var(--old-green);
--status-positive-background: var(--old-green);
@Mijyuoon
Mijyuoon / wordwrap.lua
Created December 31, 2019 17:45
GMod text wrapper nonsense
local mt_wraptxt = {}
mt_wraptxt.__index = mt_wraptxt
scr.META_WordWrapper = mt_wraptxt
local worditer
local CK_NONE = 0
local CK_SPACE = 1
local CK_TAB = 3
local CK_LINE = 2
@Mijyuoon
Mijyuoon / pgsql_markov.sql
Created November 26, 2019 22:20
Markov chain in PostgreSQL
CREATE OR REPLACE FUNCTION
markov_learn(a_chain BIGINT, a_source TEXT) RETURNS VOID
AS $$
DECLARE
t_depth INTEGER;
t_index INTEGER;
t_words TEXT[];
BEGIN
t_depth := a_chain & 7;
t_words := array_remove(regexp_split_to_array(a_source, E'\\s+'), '');
@Mijyuoon
Mijyuoon / dictgen.rb
Last active November 13, 2019 17:15
dictgen
require 'optparse'
require 'parslet'
require 'erubis'
module DicGen
# Dummy interface for node values
module NodeValue
def nodes(*)
enum_for(:nodes) unless block_given?
@Mijyuoon
Mijyuoon / Utilities.cs
Created September 15, 2019 15:02
SendInput crap
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace TestProject {
public static class WinAPI {
@Mijyuoon
Mijyuoon / Program.cs
Created August 17, 2019 03:04
IntelDPSTDisable
using System;
using Microsoft.Win32;
namespace IntelDPSTDisable {
class Program {
static string RegPath = @"System\{0}\Control\Class\{{4d36e968-e325-11ce-bfc1-08002be10318}}\{1}";
static string[] CSs = new[] { "ControlSet001", "CurrentControlSet" };
static string[] IDs = new[] { "0000", "0001" };
static string FeatValue = "FeatureTestControl";
@Mijyuoon
Mijyuoon / discord-image-archive.rb
Last active July 16, 2019 06:04
Discord image archiving script
require 'rest-client'
require 'json'
require 'time'
require 'digest/sha1'
require 'fileutils'
TARGET_CHAN = "CHANNEL_ID"
ARCHIVE_FROM_ID = nil # or "MESSAGE_ID"
ARCHIVE_UNTIL = Time.parse "2018-01-01"
BATCH_MIN_WAIT = 5.000
@Mijyuoon
Mijyuoon / ShittyEnglish.txt
Last active July 8, 2019 12:41
Shitty English
Shitty English v0.3
===================
Noun Cases
----------
NOM -Ø
GEN -(e)s
ACC -(e)m
DAT -(e)t
INS -with
@Mijyuoon
Mijyuoon / BaseModel.cs
Created October 29, 2018 20:12
WPF BaseModel
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace Mijyuoon.MVVM {
public abstract class BaseModel : INotifyPropertyChanged {
#region INotifyPropertyChanged
public event PropertyChangedEventHandler PropertyChanged;