Skip to content

Instantly share code, notes, and snippets.

View anna-is-cute's full-sized avatar

Anna anna-is-cute

View GitHub Profile
@EventHandler
public void onFood(FoodLevelChangeEvent e) {
e.setFoodLevel(e.getFoodLevel() / 2);
}
public class APIAPI {
public static boolean isAPI() {
return APIAPI.isAPI();
}
}
public class Bicycle {
// code
}
public class CoolBike extends Bicycle {
// code
}
public void doSomething(Class<? extends Bicycle> bikeClass) {
new Runnable() {
final AbstractEventRegistrar aer = new AbstractEventRegistrar(this);
aer.registerAbstractListener(InventoryEvent.class, new Listener() {
@EventHandler
public <T extends InventoryEvent> void onInventoryEvent(T e) {
if (e instanceof Cancellable) {
final Cancellable c = (Cancellable) e;
c.setCancelled(true);
}
}
}, EventPriority.HIGHEST);
@anna-is-cute
anna-is-cute / README.md
Last active December 22, 2023 09:27
Bamboo IRC Notifications

Bamboo IRC Notifications

Create a new stage. Make sure it runs last. Create a job within this stage. Choose the Script job.

Paste in the shell script below for the script. You may need to change the path of ruby.

For the argument field, insert the following: ${bamboo.buildResultsUrl} ${bamboo.planKey}

public
class
IAmDoingItWrong
{
public
static
void
main
(
String
/*
* RULES!
* 01. Everything must be accessed via Reflection. EVERYTHING. Exceptions:
* - java.lang.Class#forName(String)
* - java.lang.Class#getDeclaredField(String)
* - java.lang.Class#getDeclaredMethod(String, Object...)
* - java.lang.Class#getDeclaredConstructor(Object...)
* - java.lang.reflect.Field#get(Object)
* - java.lang.reflect.Method#invoke(Object...)
* - java.lang.reflect.Constructor#newInstance(Object...)
/*
* RULES!
* 01. Everything must be accessed via Reflection. EVERYTHING. Exceptions:
* - java.lang.Class#forName(String)
* - java.lang.Class#getDeclaredField(String)
* - java.lang.Class#getDeclaredMethod(String, Object...)
* - java.lang.Class#getDeclaredConstructor(Object...)
* - java.lang.reflect.Field#get(Object)
* - java.lang.reflect.Method#invoke(Object...)
* - java.lang.reflect.Constructor#newInstance(Object...)
2. Bike ride
‘I was about 15 minutes from finishing the night shift at work when there was a massive crash on one of the windows in the office so I get up and go to check it out. Someone has thrown quite a sizable rock through one of the windows on the front of the building.
‘This is made especially weird because I’m working in the industrial district at 11:30 at night with none of the other businesses open. I go back to my desk, put a quick call through to security to let them know and decide to head home.
‘As I’m leaving the building I’m freaking myself out about it more and more and end up running to my car, getting in and taking off. I’m almost home and I’ve started to calm down a bit when I realise that I didn’t unlock my car when I got in. It had been unlocked the whole time. I do a quick check with my hand in the backseat for any possible murderers that might be hanging around there but there’s nothing there.
‘Fast forward 30 minutes: I’ve called a friend of mine who says he is out drinking so I de

Keybase proof

I hereby claim:

  • I am jkcclemens on github.
  • I am jkcclemens (https://keybase.io/jkcclemens) on keybase.
  • I have a public key whose fingerprint is 260B 54F5 641A 3F4C 7739 8CF5 AD5B FDE7 B5FF D961

To claim this, I am signing this object: