Skip to content

Instantly share code, notes, and snippets.

View Sytm's full-sized avatar

Md5Lukas Sytm

  • Germany, Hesse
  • 01:16 (UTC +01:00)
View GitHub Profile
@LambdAurora
LambdAurora / optifine_alternatives_fabric.md
Last active August 5, 2025 13:20
Recommended OptiFine alternatives on Fabric

The list is moving out!

If you share this list, please use this link instead: https://lambdaurora.dev/optifine_alternatives

It may still be only a redirection link, but it will have a better web display of the list soon. And the list being on GitHub/GitHub pages improves load times.

The gist version of this list will stop being updated.

Why?

@aadnk
aadnk / FakeEntity.java
Created February 15, 2014 11:19
A fake entity.
package com.comphenix.example;
import java.util.Collections;
import java.util.List;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
@CrookedNumber
CrookedNumber / gist:8964442
Created February 12, 2014 21:02
git: Removing the last commit

Removing the last commit

To remove the last commit from git, you can simply run git reset --hard HEAD^ If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.

If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^ which will evict the commits from the branch and from the index, but leave the working tree around.

If you want to save the commits on a new branch name, then run git branch newbranchname before doing the git reset.

These are only examples, for a few very common actions. You are expected to write your own rules for the rest. The syntax is regular JavaScript, but see the polkit(8) manpage for the object structure and available API. These examples are for polkit versions 106 and later, with the JS interpreter. They won't work with Debian's polkit v105.

  • If you don't know the action name, either run pkaction and look for anything similar:

    pkaction | grep cups
    

    ...or try to perform the actual action, cancel it, then look in your system logs:

    journalctl -t polkitd -n 10 | grep action