Skip to content

Instantly share code, notes, and snippets.

import readline from "node:readline";
import chalk from "chalk";
const rl = readline.createInterface({
input: process.stdin,
});
rl.on("line", (line) => {
const parsed = maybeJSON(line);
@joshhunt
joshhunt / Dockerfile
Created February 14, 2024 14:08
Subsetting fonts
FROM python:3.7-alpine
RUN apk add --no-cache bash
RUN pip install fonttools brotli zopfli
ADD ./subset-fonts.sh /subset-fonts.sh
ENTRYPOINT [ "bash", "/subset-fonts.sh", "/fonts", "#{$font-file-path}/" ]
@joshhunt
joshhunt / original.md
Created August 25, 2023 19:52 — forked from yonta/original.md
Spawn Rules of Minecraft in Bedrock Edition

Spawn cycle

Bedrock Edition

Natural spawning in Bedrock Edition shares only a few similarities to natural spawning in Java Edition. In Bedrock Edition, there are two main types of natural spawns: pack spawns and structure mob spawns. Structure mob spawns are mobs spawned as part of a structure, such as nether fortresses, witch huts, etc. Pack spawns account for all other types of natural spawns, including mobs that spawn individually (i.e. not in a pack of 2 or more). Both types of natural spawns follow the same rules for spawn conditions and the mob cap.

{
"content_type": {
"title": "Nebula Product Page",
"description": "",
"options": {
"is_page": false,
"singleton": true,
"sub_title": [],
"title": "title"
},
[
{
"title": "Destiny 2 Hotfix 4.1.5.2",
"patchNotesURL": "/en/News/Article/51623",
"patchNotesDate": "2022-08-02T18:08:40Z",
"version": "4.1.5.2",
"depots": [
{
"depotId": 1085661,
"depotName": "base",
@joshhunt
joshhunt / Grafana issue troubleshooting.md
Last active July 13, 2022 14:14
Grafana docker troubleshooting

Test upgrading versions

You can create a docker volume to hold the data directory to persist it through multiple upgrades:

# If you've already created a volume, delete it if you want to start fresh
docker volume create grafana

# Create a new volume
docker volume create grafana
{
"__inputs": [
{
"name": "DS_GRAFANACLOUD-JOSHHUNT-PROM",
"label": "grafanacloud-joshhunt-prom",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
class Unmined {
map(mapId, options, regions) {
const dpiScale = window.devicePixelRatio ?? 1.0;
const worldMinX = options.minRegionX * 512;
const worldMinY = options.minRegionZ * 512;
const worldWidth = (options.maxRegionX + 1 - options.minRegionX) * 512;
const worldHeight = (options.maxRegionZ + 1 - options.minRegionZ) * 512;
const worldTileSize = 256;
content/common/ai_spawner/classifier_action_hopon.pattern.tft
content/common/native/sandbox/character_perk.string_menu.tft
content/common/native/sandbox/label_globals.label_globals.tft
content/common/native/sandbox/player_builds.string_menu.tft
content\activities_com01\ghost\highlight\highlight.sequence.tft
content\activities_com01\globals\r1_s4_activity_modifier_globals.activity_modifier_globals.tft
content\activities_com01\hopons\raids\epiphany\scepter\pocket_dimension_player_teleport\components\pocket_dimension_player_teleport_object.pattern.tft
content\activities_com01\hopons\raids\epiphany\scepter\pocket_dimension_player_teleport\components\pocket_dimension_player_teleport_return_object.pattern.tft
content\activities_com01\hopons\raids\epiphany\scepter\pocket_dimension_player_teleport\pocket_dimension_player_teleport.pattern.tft
content\activities_com01\hopons\raids\global\wipe_damage\instant\wipe_damage_instant.pattern.tft
{
"contentHash": 3289191274,
"dialogues": [
{
"contentHash": 694142546,
"type": "DialogueTree",
"dialogue": {
"contentHash": 694142546,
"type": "DialogueSequence",
"sequence": [