Skip to content

Instantly share code, notes, and snippets.

View insanj's full-sized avatar
🎉
insanj.com

Julian Weiss insanj

🎉
insanj.com
View GitHub Profile
@insanj
insanj / pride_compass_command.java
Created April 9, 2019 08:16
How to Change Where a Minecraft Player's Compass Points - 19w12b minecraft snapshot / fabric api
CommandRegistry.INSTANCE.register(false, serverCommandSourceCommandDispatcher -> serverCommandSourceCommandDispatcher.register(
ServerCommandManager.literal("compass")
.executes(context -> {
BlockPos pos = new BlockPos(x, y, z);
ServerPlayerEntity player = context.getSource().getPlayer();
PlayerSpawnPositionS2CPacket packet = new PlayerSpawnPositionS2CPacket(pos);
player.networkHandler.sendPacket(packet);
})
));
net/minecraft/class_124 net/minecraft/text/TextFormat
method_534 byId
method_536 getId
method_539 stripFormatting
method_542 isModifier
method_533 getFormatByName
method_543 isColor
method_535 sanitizeName
method_532 getColor
method_537 getFormatName
@insanj
insanj / switch_to_madden.md
Created December 23, 2018 17:50
Use any controller with Madden 19 🏈

Use any controller with Madden 19 🏈

  1. Plug in controller (mine is a Nintendo Switch Pro controller based on the Gamecube made by PDP).
  2. Launch Steam.
  3. Add Madden 19 to Steam's Game Library by going to the Games > Add Non-Steam Game To Your Library option.
  4. Quit Origin.
  5. Launch Steam's Big Picture mode.
@insanj
insanj / windows-mac-interop.md
Created August 23, 2018 19:07
🌉Bridges between Windows and Mac

🌉 Bridges between Windows and Mac

Stuff that makes it easier to use both at the same time

🕹 Virtual Monitor (aka mouse/keyboard sharing)

  • Synergy (Note: Highly recommend the beta version)

🔊 Music

  • Airfoil (Note: Satellite = Speaker)
@insanj
insanj / binance_api_ticker.py
Last active April 18, 2018 01:41
Binance API Ticker
import requests
import json
import datetime
import pytz
import time
print("Welcome 🙂\n-------\nCreated by Julian Weiss 2018 Feb 8 (c)\n\n")
def check_binance_api(last_status):
remote_data = requests.get('https://api.binance.com/api/v1/exchangeInfo').content

Common Sense Balancing Standard (CSBS)

  • No ore tripling, quadrupling, quintupling, etc. Ever.
    • The absolute limit on ore multiplication is 2.6 ingots per ore block, with typical gains being closer to 1.6.
  • A single block can never store more than 36 stacks of items, even when it's part of a multiblock structure.
  • Furnace-burning fuels should produce no more than 30RF per furnace fuel tick.
    • It can produce this as slowly or as quickly as you want.
  • Wireless interactions are permissible, and a trivial wireless implementation generally performs well.
    • However, well-designed network-topography-aware systems (i.e. wires) often outstrip the performance of wireless systems, and occasionally even dumb cellular systems do. More importantly, wireless is unsatisfying gameplay.
  • Time is not a balancing mechanic.
@chourobin
chourobin / 0-bridging-react-native-cheatsheet.md
Last active June 28, 2024 20:49
React Native Bridging Cheatsheet
@MiniDigger
MiniDigger / StructureUtil.java
Last active May 27, 2021 09:07
Small util to load and save structures, using nms and reflection
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.util.Vector;
/**
* Small util to load and save structures<br>
@bahmutov
bahmutov / README.md
Last active July 11, 2022 13:03
Trying Redis in Docker + as-a

Goal: try redis inside a Docker container

Run Redis Docker image

  1. Open docker terminal
  • displays docker is configured to use the default machine with IP 192.168.99.100
  1. Start redis:alpine prebuilt container from docker hub.
  • docker run --name redis -p 6379:6379 -d redis:alpine
  • the "alpine" image is very slim (5MB!)
  • the running container binds the internal port 6379 to the "outside" world port with same number
@rponte
rponte / get-latest-tag-on-git.sh
Last active July 4, 2024 10:55
Getting latest tag on git repository
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples