Skip to content

Instantly share code, notes, and snippets.

@DJStompZone
DJStompZone / README.md
Last active December 17, 2023 03:08
Troubleshooting Guide for Installation Errors on Unix Systems

Boot Camp

A Troubleshooting Guide for Installation Errors on Unix Systems

Polish_20231216_181351622

Preliminary Checks

  • Check the USB Stick: Ensure the USB is not physically damaged and is showing up correctly in other operating systems.

  • Inspect the Downloaded ISO: Redownload the ISO file and compare the checksum with the original source to confirm it hasn't been corrupted during download.

#!/bin/bash
PYTHON_PATH=$(which python3)
if [ -z "$PYTHON_PATH" ]; then
PYTHON_PATH=$(which python)
fi
if [ -z "$PYTHON_PATH" ]; then
echo "Python is not installed or not found in PATH."
@DJStompZone
DJStompZone / day2.py
Created December 4, 2023 10:16
Advent of Code - Day 2
inputs_file = "inputs.txt"
sanity_check_data = {
"inputs": [
"Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green",
"Game 2: 1 blue, 2 green; 3 green, 4 blue, 1 red; 1 green, 1 blue",
"Game 3: 8 green, 6 blue, 20 red; 5 blue, 4 red, 13 green; 5 green, 1 red",
"Game 4: 1 green, 3 red, 6 blue; 3 green, 6 red; 3 green, 15 blue, 14 red",
"Game 5: 6 red, 1 blue, 3 green; 2 blue, 1 red, 2 green"
],
@DJStompZone
DJStompZone / pillow_cropper.py
Created November 29, 2023 02:32
Crop an Image With Pillow
from PIL import Image
import io
from typing import Tuple, Optional, Bytes
def crop_image(image_bytes: Bytes, new_size: Optional[Tuple[int, int]] = (2400, 2400)) -> Bytes:
"""
Crops an image from a byte buffer to a specified size and returns the cropped image as a byte buffer.
This function takes an image in the form of a byte buffer, crops it to the specified dimensions,
and returns the cropped image as a byte buffer. The cropping is centered, meaning the function
@DJStompZone
DJStompZone / README.md
Created September 22, 2023 18:36
The Ultimate Home Lab

Ultimate Home Lab

A Masterclass in Computing and Networking

By: Shadowdrums

Introduction

Welcome to a guided tour of one of the most comprehensive and advanced home lab setups you'll likely encounter. Designed with meticulous attention to detail and an evident depth of understanding of computing, networking, and cybersecurity, this home lab serves as a practical, educational, and experimental platform for a myriad of I.T. disciplines.

@DJStompZone
DJStompZone / MD_CRASH_COURSE.md
Created April 19, 2023 21:45
Markdown crash course

Markdown

"It's easier than it looks!"

  • Famous Last Words

So... You want to write a README?

Let's go over the basics

@DJStompZone
DJStompZone / audio-visualizer-based-on-three-js.markdown
Created December 31, 2022 15:10
Audio Visualizer based on Three.js

Audio Visualizer based on Three.js

I wanted to use the Web Audio API, so made this music visualizer. The basic idea came from a pen I found here on codepen itself ( will link to it as soon as I find it ).

To use> Just upload any mp3 file and watch the bubble do weird things!

( Let me know what you think in the comments - good/bad/ugly )

A Pen by Prakhar Bhardwaj on CodePen.

@DJStompZone
DJStompZone / index.html
Created December 31, 2022 14:42
Newton's CSS cradle
<div class="cradle">
<div class="floor"></div>
<div class="wood base">
<div class="left"></div>
<div class="right"></div>
<div class="front"></div>
<div class="back"></div>
<div class="top">
@DJStompZone
DJStompZone / index.html
Last active September 18, 2022 12:59
This form :has whimsical touches ✨
<html>
<head>
<link href="https://gist.githubusercontent.com/DJStompZone/99e84c6198db753d2a7dcfb214775c2a/raw/d1bb4e55a78bc553b55d9a6601fdc77f7be3329d/style.css" rel="stylesheet" />
<link href="https://unpkg.com/open-props/colors-hsl.min.css" rel="stylesheet" />
<link href="https://unpkg.com/open-props/open-props.min.css" rel="stylesheet" />
<link href="https://unpkg.com/open-props/normalize.min.css" rel="stylesheet" />
</head>
<body>
<form action="">
<div class="form-group">
@DJStompZone
DJStompZone / blockstate_protocol.md
Created June 18, 2022 02:47 — forked from Tomcc/blockstate_protocol.md
Block Changes in Beta 1.2.13

Block Storage & Network Protocol Changes

Paletted chunks & removing BlockIDs brings a few big changes to how blocks are represented. In Bedrock, Blocks used to be represented by their 8 bit ID and 4 bit data; this means that we can only represent 256 blocks and 16 variants for each block. As it happens we ran out of IDs in Update Aquatic, so we had to do something about it :)

After this change, we can represent infinite types of Blocks and infinite BlockStates, just like in Java. BlockStates are what is sent over the network as they are roughly equivalent to the old ID+data information, eg. they're all the information attached to a block.

BlockStates are serialized in two ways:

PersistentID: a PersistentID is a NBT tag containing the BlockState name and its variant number; for example