Skip to content

Instantly share code, notes, and snippets.

@reoseah
reoseah / index.html
Created February 6, 2024 11:33
Solid.JS using Lit templates without needing build step and Node
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Solid.JS Lit templates test</title>
<script type="module">
import { createSignal } from 'https://cdn.jsdelivr.net/npm/solid-js@1.8.12/+esm'
/**
* Checks whether all of given items can be inserted into an inventory.
*/
public static <T extends ItemInventory & ItemInsertable> boolean canInsertAll(List<ItemStack> stacks, T inventory) {
if (stacks.size() == 0) {
return true;
}
if (stacks.size() == 1) {
return inventory.canInsertFully(stacks.get(0));
}
@reoseah
reoseah / BlockComponentFallback.java
Created February 5, 2020 20:58
simple components
package velvet.components;
import org.eclipse.jdt.annotation.Nullable;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.world.BlockView;
public interface BlockComponentFallback<T> {
@reoseah
reoseah / README.md
Last active December 15, 2018 11:28
Micro syntax for Asterisk *.conf files

Put in ~/.config/micro/syntax. Based on 'ini' syntax, modified to highlight templates, arrows => and ${interpolated strings}.

It will highlight all .conf files, including any non-Asterisk files with that extension.