Skip to content

Instantly share code, notes, and snippets.

View Muirrum's full-sized avatar
🐐

Cara Salter Muirrum

🐐
View GitHub Profile
@Muirrum
Muirrum / notString.java
Created September 4, 2019 11:34
AP Compsci A Summer Work - CodingBat
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 / buildLocation().java
Created September 15, 2019 21:53
This is just bad code
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 / build.gradle
Created October 25, 2019 00:27
Github Package Registry Gradle DSL
plugins {
id("maven-publish")
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/OWNER/REPOSITORY")
credentials {