Skip to content

Instantly share code, notes, and snippets.

@brecert
brecert / context.html
Last active August 15, 2022 19:13
context menu css
<menu class="ContextMenu">
<div class="section">
<li><button>Action 1</button></li>
<li><button>Action 2</button></li>
<li><button>Action 3</button></li>
</div>
<li><button>Action 4<div class="end">bree</div></button></li>
</menu>
html {
background: radial-gradient(#e66465, #9198e5);
}
button {
font-family: "SF Pro";
}
.ActionMenu {
/* resets */
{
"a10d": [
"acknowledged",
"accomplished",
"administered"
],
"a10e": [
"architecture"
],
"a10g": [
[-
where | means to use this bind or that bind if the bind doesn't work
-]
( IO ) : import { std.lib.io }
question : ( IO ) [ prompt: String ] { IO.gets "{prompt}: " }
question : ( IO ) [ prompt: String, valid: List[String] ] {
input = IO.gets "{prompt}\n({valid.join ", "}): " .trim
{
"minecraft:charcoal": {
"id": "minecraft:charcoal",
"maxCount": 64,
"maxDamage": 0,
"translationKey": "item.minecraft.charcoal",
"isEdible": false,
"isDamageable": false,
"isEnchantable": false,
"isFireResistant": false,
<svg
width="360"
height="360"
viewBox="0 0 360 360"
version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
>
<style>
function nbtCompoundToObject(nbt) {
return Object.fromEntries(
Array.from(nbt.getKeys())
.map(key => [key, nbtToObject(nbt.get(key))])
)
}
function nbtListToArray(nbt) {
return Array(nbt.length())
.fill(null)
SELECT
item.id,
item.name,
item.description
FROM
item,
tag
INNER JOIN itemtaglink ON
itemtaglink.item_id = item.id AND
itemtaglink.tag_id = tag.id
const dbg = (v, ...args) => (console.log(v, ...args), v)
const samplePick = (arr) => arr[~~(Math.random() * arr.length)]
const sortZeros = (arr, dir) =>
arr.sort((a, b) => (dir === 'end' ? a === 0 : b === 0) ? -1 : 1)
// Possibly the worst part of this code
// I would like to clean this up and optimize it at some point
const merge2048 = (arr, dir) => {
meta:
id: plymodel
endian: le
file-extension: plymodel
imports:
- /image/png
# strings are prefixed with thier length beforehand, and *do not* need to be aligned.
seq: