Skip to content

Instantly share code, notes, and snippets.

View hezamu's full-sized avatar

Henri Muurimaa hezamu

View GitHub Profile
@hezamu
hezamu / gist:5a0c088ad4d9792396b53f76cb013e32
Last active April 19, 2025 08:09
How to set up a Minecraft CABIN server on Linux

Instructions how to set up a Linux server for the Minecraft modpack CABIN. The instructions were written by Google Gemini. Instructions tested on CABIN release 2.0.4. CABIN discord link in CurseForge for more info.

  1. Download the Correct Minecraft Server Jar:

    • Go to the official Minecraft website and download the server jar file for the exact Minecraft version that the CABIN modpack is designed for. Save it on your Linux system.
  2. Download the Correct Forge Version:

    • Identify the specific Forge version required by the CABIN modpack (check its CurseForge page or download source).
    • Visit the official Minecraft Forge website and download the installer (.jar file) for the matching Minecraft and Forge versions. Save it in the same location as the server jar.
  3. Install Forge on the Server:

@hezamu
hezamu / Java varargs from Scala
Last active August 26, 2019 18:38
How to call a Java method with varargs from Scala.
I ran into the "ambiguous reference to overloaded definition" error while trying to create a Vaadin ShortcutAction from Scala like this:
val upAction = new ShortcutAction("up", ShortcutAction.KeyCode.ARROW_UP, null)
ShortcutAction has a few constructors with repeating parameters (varargs), but specifying null as the last parameter clears things up in Java. Scala on the other hand seems unable to figure out which constructor I'm trying to call.
Now, Scala has a special syntax to tell the compiler to pass a Seq as varargs, ": _*". So, I figured out this would work:
val upAction = new ShortcutAction("up", ShortcutAction.KeyCode.ARROW_UP, Array(): _*)
#!/usr/bin/python
# Expects the AWS_ enviornment variables to be set for boto to know how to connect to AWS/S3 - they are:
# AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
#
# Change the bucket name from mbafford-static for your own uses.
#
# Obvious enhancements would be to add the necessary tags for displaying artwork for the show in podcast software.
import re
@hezamu
hezamu / CanvastestUI.java
Last active December 22, 2016 11:50
Demonstrate how to use the various features with the Vaadin 7 version of the Canvas add-on.
import org.vaadin.hezamu.canvas.Canvas;
import org.vaadin.hezamu.canvas.Canvas.CanvasImageLoadListener;
import com.vaadin.server.VaadinRequest;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.UI;