Skip to content

Instantly share code, notes, and snippets.

@AinTunez
AinTunez / bb-community-enhance.user.js
Last active July 10, 2020 10:16
BB Community Enhancements
// ==UserScript==
// @name BB Community Enhancements
// @namespace cliff.weinstein@mcphs.edu
// @version 0.5
// @description Makes the Bb Community site easier to use.
// @author You
// @match https://community.blackboard.com/*
// @grant none
// ==/UserScript==
Active: 
    001: Eat Stuff (Grass / Divine Blessing / Purging Stone / Egg Vermifuge / etc)
    002: Use Consumable Weapon Buff
    003: Fast Throw (Alluring Skull / Throwing Knife / etc)
    004: Slow Throw (Lloyd's Talisman / Firebomb / etc)
    005: Binoculars Raise
    006: Binoculars View
    007: Binoculars Lower
    008: Use Repair Powder
private string EventToString(EMEVD.Event evt)
{
var paramList = new Dictionary<long, List<EMEVD.Parameter>>();
for (int i = 0; i < evt.Instructions.Count; i++)
paramList[i] = new List<EMEVD.Parameter>();
foreach (var p in evt.Parameters)
paramList[p.InstructionIndex].Add(p);
var headerParams = new List<string>();
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
static void DrawParamSetup()
{
for (int num = 10; num <= 18; num++)
{
Console.WriteLine("a" + num + "_DrawParams");
var PTD_DrawParams = GetGameParams(PTD_Path + @"param\DrawParam\a" + num + "_DrawParam.parambnd");
var DSR_DrawParams = GetGameParams(DSR_Path + @"param\DrawParam\a" + num + "_DrawParam.parambnd");
var DSR_DrawParams_DMY = GetGameParams(DSR_Path + @"param\DrawParam\a" + num + "_DrawParam.parambnd");
public class MemoryEditor {
Process p = null;
public MemoryEditor(string s) {
p = Process.GetProcessesByName(s).FirstOrDefault();
}
public IntPtr[] search (byte[] pattern [, IntPtr startIndex, IntPtr endIndex]) {
// search for occurences of a byte pattern and return an array containg the addresses
@AinTunez
AinTunez / logicSwing.js
Created April 25, 2018 12:25
Logic Pro X script to non-destructively add swing
PluginParameters = [
{name: 'Swing %', minValue: 0, maxValue: 30, numberOfSteps: 60, defaultValue: 20},
{name: 'Note Length Adjust %', minValue: 0, maxValue: 100, numberOfSteps: 200, defaultValue: 50},
{name: 'Ignore Channel', minValue: 0, maxValue: 16, numberOfSteps: 16, defaultValue: 0}
];
var beat = 0;
NeedsTimingInfo = true;
var activeSwing = [];
function HandleMIDI (e) {
var ignore = GetParameter('Ignore Channel'), delay = GetParameter('Swing %')/100;
@AinTunez
AinTunez / formatXML.js
Last active September 30, 2016 17:13
XML String Formatter
function formatXML(input) {
// PART 1: Add \n where necessary
// A) add \n between sets of angled brackets without content between them
// B) remove \n between opening and closing tags of the same node if no content is between them
// C) add \n between a self-closing set of angled brackets and the next set
// D) split it into an array
xmlString = input.trim()
.replace(/>\s*</g,'>\n<')