Skip to content

Instantly share code, notes, and snippets.

View Tschrock's full-sized avatar

Tyler Schrock Tschrock

  • Progressive
  • Ohio, USA
  • 23:55 (UTC -04:00)
View GitHub Profile
@Tschrock
Tschrock / jxa-window.js
Last active May 7, 2022 00:54
Creating a window in JXA, without needing to save the script as a stay-open application in Script Editor
#!/usr/bin/env osascript -l JavaScript
// Creating a window in JXA, without needing to save the script as a stay-open application in Script Editor
// References:
// - https://developer.apple.com/library/archive/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/Articles/OSX10-10.html
// - https://sarunw.com/posts/how-to-create-macos-app-without-storyboard/
// - https://gist.github.com/search?q=user%3Auchcode+jxa
// - https://stackoverflow.com/questions/32555933/programmatically-creating-and-populating-a-nswindow-using-jxa
{
"format_version": "1.12.0",
"minecraft:geometry": [
{
"description": {
"identifier": "geometry.test.tschrock",
"texture_width": 64,
"texture_height": 64,
"visible_bounds_width": 3,
"visible_bounds_height": 2.5,
#!/bin/sh
#
# ask2run
# v1.0.0
#
# Provides a graphical prompt for opening or executing a script file, emulating
# GNOME Files (Nautilus)'s old "Do you want to run X?" prompt that has since
# been removed. Depends on `zenity` for graphical prompts.
#
# -------------- Usage ----------------
@Tschrock
Tschrock / urlscraper.c
Created September 2, 2020 21:41
A hastily thrown together c program to scrape urls out of files in a directory. I don't write c so feel free to laugh (or cry) at all the things I did wrong.
#include <stdio.h>
#include <unistd.h>
#include <ftw.h>
#define BUFFER_SIZE (1 * 1024 * 1024)
void filterfile(const char *filepath) {
unsigned char buffer[BUFFER_SIZE];
FILE * file;
@Tschrock
Tschrock / format_versions.md
Created March 26, 2020 16:52
Format versions that I've found for Minecraft Bedrock Add-ons
Schema format_version In schemas In examples In vanilla
animation 1.8.0 Yes Yes Yes
animation_controller 1.8.0 Yes Yes Yes
1.10.0 Yes Yes Yes
block_reference 1.10.0 Yes No
client_entity 1.8.0 Yes Yes Yes
1.10.0 Yes Yes Yes
attachable 1.8.0 Yes Yes Yes
1.10 No No Yes
@Tschrock
Tschrock / minecraft-hummingbird-ui-quirks.md
Created February 2, 2020 02:22
A collection of bugs, quirks , and workarounds I've found for Minecraft: Bedrock Edition's experimental UI.

Minecraft Bedrock - Hummingbird UI

The UI engine has a number of quirks, this file tries to document some of them.

Document/Body

  • The top of the screen gets cut off by about 4 pixels

Fonts

  • Fonts act a bit weird. Some elements will inherit the font-family of their parent, while others like buttons do not. Also, there doesn't seem to be a fallback font (or it's not working on my system) because anything without a font-family (or set to an invalid font-family) does not render text.
@Tschrock
Tschrock / derpibooru-icon-ponies.css
Created August 11, 2019 21:29
Ponifies the Favorite/Upvote/Downvote Buttons on https://derpibooru.org
@-moz-document domain("derpibooru.org"), domain("trixiebooru.org") {
.interaction--fave .fa, .interaction--upvote .fa, .interaction--downvote .fa, .interaction--comments .fa {
background-size: 100% 100%;
color: transparent;
width: 20px;
height: 20px;
vertical-align: middle;
}
#!/bin/bash
# Usage:
# sudo ./modify_rpi_disk_image.sh raspbian-stretch-lite.img
function exit_with_error {
echo "Error: $2"
exit $1
}

Keybase proof

I hereby claim:

  • I am tschrock on github.
  • I am cyberpon3 (https://keybase.io/cyberpon3) on keybase.
  • I have a public key ASCXDj9kLceqhUGdbC0fzoZqdtX1pQdSFPM1w6Tuuo5ihgo

To claim this, I am signing this object:

@Tschrock
Tschrock / scpupload
Last active February 19, 2023 03:48
The shell script I use for automatically uploading screenshots
#!/bin/bash
SCREENSHOTS_DIR="$HOME/Pictures/Screenshots/"
REMOTE_HOST="cyber@luna.cyberpon3.net"
REMOTE_PORT="9433"
REMOTE_PATH="/var/www/p.cp3.es/"
HTTP_HOST="https://p.cp3.es/"