Skip to content

Instantly share code, notes, and snippets.

💻
Hackagotchi!

Owen Salter Muirrum

💻
Hackagotchi!
View GitHub Profile
@Muirrum
Muirrum / build.gradle
Created Oct 25, 2019
Github Package Registry Gradle DSL
View build.gradle
plugins {
id("maven-publish")
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/OWNER/REPOSITORY")
credentials {
@Muirrum
Muirrum / buildLocation().java
Created Sep 15, 2019
This is just bad code
View buildLocation().java
public void buildLocations() {
for (LocationFactory factory : factories) {
Method[] methods = factory.getClass().getMethods();
for (Method method : methods) {
try {
method.invoke(null);
} catch (Exception e) {
MessageQueue.add(e.getStackTrace().toString());
}
}
@Muirrum
Muirrum / notString.java
Created Sep 4, 2019
AP Compsci A Summer Work - CodingBat
View notString.java
public String notString(String str) {
// If the arg starts with not... (https://howtodoinjava.com/java/string/java-string-startswith-example/)
if (str.startsWith("not")) {
return str;
// Otherwise...
} else {
return "not " + str;
}
}
@Muirrum
Muirrum / main.js
Created Aug 13, 2019
OtmasBot Original Source Code
View main.js
const Discord = require("discord.js");
const client = new Discord.Client();
const VERSION = "0.10.5-beta.2";
const config = require("./config.json");
const roleName = config.modRole;
var prefix = config.prefix;
const got = require("got");
//const music = require("discord.js-music");
const noisyDebug = false;
View about.md

General

I'm an Eagle Scout from the Northeast United States. I write mostly in Rust now, but I used to work mainly in Java and Node.JS. Outside of coding, I enjoy hiking and radios.

Current Projects

Campmaster Constantine

A discord bot written in Rust using the serenity library.

Past Projects

OtmasBot

My first foray into what could be called "real" programming, the OtmasBot is a mess of a file and a repository. The link above takes you to the last commit where those files can be browsed. Much of the commands didn't work, and when they did, they didn't work well. It still ran for a long time though, and it didn't dissuade me from trying again.

MatterOverdrive

@Muirrum
Muirrum / sewers.c
Created Jul 2, 2019
Hakkard Lennar Sewers Virtual Handler - Non-Working
View sewers.c
#include <lib.h>
#include <dirs.h>
#include <terrain_types.h>
#include <medium.h>
#include <virtual.h>
inherit LIB_VIRT_LAND;
static private int Xpos, Ypos;
View odogarfield.c
#include <lib.h>
#include <daemons.h>
#ifndef REQUIRE_QUESTING
#define REQUIRE_QUESTING 1
#endif
inherit LIB_SENTIENT;
int hint;
int Advance(mixed arg);
mapping advancement, Levels;
View keybase.md

Keybase proof

I hereby claim:

  • I am muirrum on github.
  • I am devosmium (https://keybase.io/devosmium) on keybase.
  • I have a public key ASB48bPfY83SOpconmaEfq8BH7NIL-8X3ZDVygxGqCEzYAo

To claim this, I am signing this object:

@Muirrum
Muirrum / navbar.js
Created Mar 19, 2019
Javascript to create a templated navbar using bootstrap. Requires bootstrap and a <nav id="navbar"> to exist in the HTML file. Should be deferred.
View navbar.js
// Define navbar variable
var nav = document.getElementById("navbar");
// Navbar setup
nav.setAttribute("class", "navbar navbar-expand-lg navbar-light bg-light");
// Create UL and container div
var contDiv = document.createElement("DIV");
contDiv.setAttribute("class", "collapse navbar-collapse");
contDiv.setAttribute("id", "navbarSupportedContent");
nav.appendChild(contDiv);
View FakeI2CBusDriver.java
package frc.robot.utilities;
import edu.wpi.first.wpilibj.I2C;
public class FakeI2CBus extends I2C {
public FakeI2CBus(int address) {
super(I2C.Port.kOnboard, address);
}
You can’t perform that action at this time.